| Modifier and Type | Field and Description |
|---|---|
| private int | address
the actual output address of this instance, if known, or
|
| private final Dop | |
| private final SourcePosition | position
|
| private final RegisterSpecList | registers
|
| Access | Constructor and Description |
|---|---|
| public | DalvInsn(Dop
the opcode; one of the constants from opcode, SourcePosition Dopsnon-null; source positionnon-null; register list, including a
result register if appropriate (that is, registers may be either
ins and outs)Constructs an instance. |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract String | Returns: null-ok; the string version of any arguments or
null if there are noneGets the string form for any arguments to this instance. |
| public abstract int | Returns: >= 0; the code size of this instructionGets the size of this instruction, in 16-bit code units. |
| public DalvInsn | Returns: null-ok; the prefix, if anynon-null; set of compatible registersGets the instruction prefix required, if any, to use in an expanded version of this instance. |
| public DalvInsn | Returns: null-ok; the suffix, if anynon-null; set of compatible registersGets the instruction suffix required, if any, to use in an expanded version of this instance. |
| public DalvInsn | Returns: non-null; the replacementnon-null; set of compatible registersGets the instruction that is equivalent to this one, except that
it replaces incompatible registers with sequential registers
starting at |
| public final int | Returns: >= 0; the output addressGets the output address of this instruction, if it is known. |
| public DalvInsn | Returns: non-null; the replacementGets the instruction that is equivalent to this one, except that
it uses sequential registers starting at |
| public final int | Returns: >= 0; the minimum distinct register requirementnon-null; set of compatible registersGets the minimum distinct registers required for this instruction. |
| public final int | |
| public final Dop | |
| public final SourcePosition | |
| public final RegisterSpecList | |
| public final boolean | |
| public final boolean | Returns: true iff this opcode uses a result registerReturns whether this instance's opcode uses a result register. |
| public final String | |
| public final String | Returns: null-ok; the string form or null if this
instance should not appear in a listingnon-null; prefix before the address; each follow-on
line will be indented to match as well>= 0; the width of the output or 0 for
unlimited widthwhether to include an explicit notation of
constant pool indices noteIndices)Returns the string form of this instance suitable for inclusion in a human-oriented listing dump. |
| protected abstract String | Returns: null-ok; the listing stringwhether to include an explicit notation of
constant pool indices noteIndices)Helper for |
| public static SimpleInsn | Returns: non-null; an appropriately-constructed instancenon-null; source position informationnon-null; destination registernon-null; source registerMakes a move instruction, appropriate and ideal for the given arguments. |
| public final void | |
| public final String | |
| public abstract DalvInsn | Returns: non-null; an appropriately-constructed instancenon-null; the new opcodeReturns an instance that is just like this one, except that its opcode is replaced by the one given, and its address is reset. |
| public abstract DalvInsn | Returns: non-null; an appropriately-constructed instancethe amount to offset register references by 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. |
| public abstract DalvInsn | Returns: non-null; an appropriately-constructed instancenon-null; new register listReturns an instance that is just like this one, except that the register list is replaced by the given one, and its address is reset. |
| public abstract void |
| address | back to summary |
|---|---|
| private int address the actual output address of this instance, if known, or
| |
| opcode | back to summary |
|---|---|
| private final Dop opcode the opcode; one of the constants from | |
| position | back to summary |
|---|---|
| private final SourcePosition position
| |
| registers | back to summary |
|---|---|
| private final RegisterSpecList registers
| |
| DalvInsn | back to summary |
|---|---|
| public DalvInsn(Dop opcode, SourcePosition position, RegisterSpecList registers) Constructs an instance. The output address of this instance is initially
unknown ( Note In the unlikely event that an instruction takes
absolutely no registers (e.g., a
| |
| argString | back to summary |
|---|---|
| protected abstract String argString() Gets the string form for any arguments to this instance. Subclasses must override this.
| |
| codeSize | back to summary |
|---|---|
| public abstract int codeSize() Gets the size of this instruction, in 16-bit code units.
| |
| expandedPrefix | back to summary |
|---|---|
| public DalvInsn expandedPrefix(BitSet compatRegs) Gets the instruction prefix required, if any, to use in an expanded version of this instance. Will not generate moves for registers marked compatible to the format by the given BitSet.
| |
| expandedSuffix | back to summary |
|---|---|
| public DalvInsn expandedSuffix(BitSet compatRegs) Gets the instruction suffix required, if any, to use in an expanded version of this instance. Will not generate a move for a register marked compatible to the format by the given BitSet.
| |
| expandedVersion | back to summary |
|---|---|
| public DalvInsn expandedVersion(BitSet compatRegs) Gets the instruction that is equivalent to this one, except that
it replaces incompatible registers with sequential registers
starting at | |
| getAddress | back to summary |
|---|---|
| public final int getAddress() Gets the output address of this instruction, if it is known. This throws
a
| |
| getLowRegVersion | back to summary |
|---|---|
| public DalvInsn getLowRegVersion() Gets the instruction that is equivalent to this one, except that
it uses sequential registers starting at
| |
| getMinimumRegisterRequirement | back to summary |
|---|---|
| public final int getMinimumRegisterRequirement(BitSet compatRegs) Gets the minimum distinct registers required for this instruction. Uses the given BitSet to determine which registers require replacement, and ignores registers that are already compatible. This assumes that the result (if any) can share registers with the sources (if any), that each source register is unique, and that (to be explicit here) category-2 values take up two consecutive registers.
| |
| getNextAddress | back to summary |
|---|---|
| public final int getNextAddress() Gets the address immediately after this instance. This is only calculable if this instance's address is known, and it is equal to the address plus the length of the instruction format of this instance's opcode.
| |
| getOpcode | back to summary |
|---|---|
| public final Dop getOpcode() Gets the opcode.
| |
| getPosition | back to summary |
|---|---|
| public final SourcePosition getPosition() Gets the source position.
| |
| getRegisters | back to summary |
|---|---|
| public final RegisterSpecList getRegisters() Gets the register list for this instruction.
| |
| hasAddress | back to summary |
|---|---|
| public final boolean hasAddress() Gets whether the address of this instruction is known.
| |
| hasResult | back to summary |
|---|---|
| public final boolean hasResult() Returns whether this instance's opcode uses a result register.
This method is a convenient shorthand for
| |
| identifierString | back to summary |
|---|---|
| public final String identifierString() Gets the short identifier for this instruction. This is its address, if assigned, or its identity hashcode if not.
| |
| listingString | back to summary |
|---|---|
| public final String listingString(String prefix, int width, boolean noteIndices) Returns the string form of this instance suitable for inclusion in
a human-oriented listing dump. This method will return
| |
| listingString0 | back to summary |
|---|---|
| protected abstract String listingString0(boolean noteIndices) Helper for
| |
| makeMove | back to summary |
|---|---|
| public static SimpleInsn makeMove(SourcePosition position, RegisterSpec dest, RegisterSpec src) Makes a move instruction, appropriate and ideal for the given arguments.
| |
| setAddress | back to summary |
|---|---|
| public final void setAddress(int address) Sets the output address.
| |
| toString | back to summary |
|---|---|
| public final String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| withOpcode | back to summary |
|---|---|
| public abstract DalvInsn withOpcode(Dop opcode) Returns an instance that is just like this one, except that its opcode is replaced by the one given, and its address is reset. | |
| withRegisterOffset | back to summary |
|---|---|
| public abstract 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.
| |
| withRegisters | back to summary |
|---|---|
| public abstract DalvInsn withRegisters(RegisterSpecList registers) Returns an instance that is just like this one, except that the register list is replaced by the given one, and its address is reset.
| |
| writeTo | back to summary |
|---|---|
| public abstract void writeTo(AnnotatedOutput out) Writes this instance to the given output. This method should never annotate the output.
| |