public abstract class FixedSizeInsn extends DalvInsn
InsnFormat methods to write themselves. This
includes most — but not all — instructions.| Constructor and Description |
|---|
FixedSizeInsn(Dop opcode,
SourcePosition position,
RegisterSpecList registers)
Constructs an instance.
|
| Modifier and Type | Method and Description |
|---|---|
int |
codeSize()
Gets the size of this instruction, in 16-bit code units.
|
protected java.lang.String |
listingString0(boolean noteIndices)
Helper for
DalvInsn.listingString(java.lang.String, int, boolean), which returns the string
form of this instance suitable for inclusion in a
human-oriented listing dump, not including the instruction
address and without respect for any output formatting. |
DalvInsn |
withRegisterOffset(int delta)
Returns an instance that is just like this one, except that all
register references have been offset by the given delta, and its
address is reset.
|
void |
writeTo(AnnotatedOutput out)
Writes this instance to the given output.
|
argString, cstComment, cstString, expandedPrefix, expandedSuffix, expandedVersion, getAddress, getLowRegVersion, getMinimumRegisterRequirement, getNextAddress, getOpcode, getPosition, getRegisters, hasAddress, hasResult, identifierString, listingString, makeMove, setAddress, toString, withMapper, withOpcode, withRegisterspublic FixedSizeInsn(Dop opcode, SourcePosition position, RegisterSpecList registers)
-1).
Note: In the unlikely event that an instruction takes
absolutely no registers (e.g., a nop or a
no-argument no-result * static method call), then the given
register list may be passed as RegisterSpecList.EMPTY.
opcode - the opcode; one of the constants from Dopsposition - non-null; source positionregisters - non-null; register list, including a
result register if appropriate (that is, registers may be either
ins or outs)public final int codeSize()
public final void writeTo(AnnotatedOutput out)
public final DalvInsn withRegisterOffset(int delta)
withRegisterOffset in class DalvInsndelta - the amount to offset register references bynon-null; an appropriately-constructed instanceprotected final java.lang.String listingString0(boolean noteIndices)
DalvInsn.listingString(java.lang.String, int, boolean), which returns the string
form of this instance suitable for inclusion in a
human-oriented listing dump, not including the instruction
address and without respect for any output formatting. This
method should return null if this instance should
not appear in a listing.listingString0 in class DalvInsnnoteIndices - whether to include an explicit notation of
constant pool indicesnull-ok; the listing stringCopyright © 2020. All Rights Reserved.