Struct Alignment
Specifies the alignment of the data referred to by a load or store operation.
Implements
Inherited Members
Namespace: Flame.Compiler.Instructions
Assembly: Flame.Compiler.dll
Syntax
public struct Alignment : IEquatable<Alignment>
Constructors
| Improve this Doc View SourceAlignment(UInt32)
Creates a particular alignment.
Declaration
public Alignment(uint value)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | value | The alignment. |
Fields
| Improve this Doc View SourceNaturallyAligned
An alignment that represents natural alignment.
Declaration
public static readonly Alignment NaturallyAligned
Field Value
Type | Description |
---|---|
Alignment |
Unaligned
An alignment that represents byte-alignment.
Declaration
public static readonly Alignment Unaligned
Field Value
Type | Description |
---|---|
Alignment |
Properties
| Improve this Doc View SourceIsNaturallyAligned
Tells if this alignment represents a natural alignment, i.e., a pointer whose alignment matches the natural alignment of its element type.
Declaration
public bool IsNaturallyAligned { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsUnaligned
Tells if this alignment represents an unaligned pointer, i.e., a pointer that is byte-aligned.
Declaration
public bool IsUnaligned { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Value
Gets the alignment of a pointer: a factor by which the pointer is divisible.
Declaration
public uint Value { get; }
Property Value
Type | Description |
---|---|
System.UInt32 | A pointer's alignment. |
Methods
| Improve this Doc View SourceEquals(Alignment)
Tests if this alignment is identical to another alignment.
Declaration
public bool Equals(Alignment other)
Parameters
Type | Name | Description |
---|---|---|
Alignment | other | An alignment to compare with this one. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
Operators
| Improve this Doc View SourceEquality(Alignment, Alignment)
Tests if two alignments are identical.
Declaration
public static bool operator ==(Alignment first, Alignment second)
Parameters
Type | Name | Description |
---|---|---|
Alignment | first | The first alignment. |
Alignment | second | The second alignment. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Inequality(Alignment, Alignment)
Tests if two alignments are not identical.
Declaration
public static bool operator !=(Alignment first, Alignment second)
Parameters
Type | Name | Description |
---|---|---|
Alignment | first | The first alignment. |
Alignment | second | The second alignment. |
Returns
Type | Description |
---|---|
System.Boolean |
|