MemArg
class MemArg
Fields
Name | Description |
---|---|
val offset: UInt
|
|
val valueAstNode: AstNode
|
Node which calculates the value of the argument. |
Constructors
<init>
constructor(offset: Int?, alignment: Int)
Represents an Argument to a memory Instruction.
From the docs:
The offset and alignment immediates to memory instructions are optional. The offset
defaults to 0
and the alignment to the storage size of the respective memory access, which is
its natural alignment.
Parameters
Name | Description |
---|---|
offset: Int?
|
|
alignment: Int
|
Methods
isAlignmentWellFormed
fun isAlignmentWellFormed(): Boolean
Returns whether or not the value of alignment is well-formed at parse time. It must be a power of 2.
ReturnValue
Name | Description |
---|---|
Boolean
|
isAlignmentValid
fun isAlignmentValid(forByteWidth: Int?): Boolean
Returns whether or not the value of alignment is valid for the given forByteWidth upper-bound.
Parameters
Name | Description |
---|---|
forByteWidth: Int?
|
ReturnValue
Name | Description |
---|---|
Boolean
|
deDupe
fun deDupe(): MemArg
Returns a canonical instance of MemArg matching this one, if it exists.
ReturnValue
Name | Description |
---|---|
MemArg
|
equals
fun equals(other: Any?): Boolean
Parameters
Name | Description |
---|---|
other: Any?
|
ReturnValue
Name | Description |
---|---|
Boolean
|
hashCode
fun hashCode(): Int
ReturnValue
Name | Description |
---|---|
Int
|
toString
fun toString(): String
ReturnValue
Name | Description |
---|---|
String
|
Represents an Argument to a memory Instruction.
From the docs:
The offset and alignment immediates to memory instructions are optional. The offset defaults to
0
and the alignment to the storage size of the respective memory access, which is its natural alignment.