public final class TargetInsn extends FixedSizeInsn
| Constructor and Description |
|---|
TargetInsn(Dop opcode,
SourcePosition position,
RegisterSpecList registers,
CodeAddress target)
Constructs an instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
argString()
Gets the string form for any arguments to this instance.
|
CodeAddress |
getTarget()
Gets the unique branch target of this instruction.
|
int |
getTargetAddress()
Gets the target address of this instruction.
|
int |
getTargetOffset()
Gets the branch offset of this instruction.
|
boolean |
hasTargetOffset()
Returns whether the target offset is known.
|
TargetInsn |
withNewTargetAndReversed(CodeAddress target)
Returns an instance that is just like this one, except that its
opcode has the opposite sense (as a test; e.g.
|
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.
|
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.
|
codeSize, listingString0, withRegisterOffset, writeTocstComment, cstString, expandedPrefix, expandedSuffix, expandedVersion, getAddress, getLowRegVersion, getMinimumRegisterRequirement, getNextAddress, getOpcode, getPosition, getRegisters, hasAddress, hasResult, identifierString, listingString, makeMove, setAddress, toString, withMapperpublic TargetInsn(Dop opcode, SourcePosition position, RegisterSpecList registers, CodeAddress target)
-1), and the target is initially
null.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)target - non-null; the branch targetpublic DalvInsn withOpcode(Dop opcode)
withOpcode in class DalvInsnopcode - non-null; the new opcodenon-null; an appropriately-constructed instancepublic DalvInsn withRegisters(RegisterSpecList registers)
withRegisters in class DalvInsnregisters - non-null; new register listnon-null; an appropriately-constructed instancepublic TargetInsn withNewTargetAndReversed(CodeAddress target)
lt test becomes a ge), and its branch
target is replaced by the one given, and all set-once values
associated with the class (such as its address) are reset.target - non-null; the new branch targetnon-null; an appropriately-constructed instancepublic CodeAddress getTarget()
non-null; the branch targetpublic int getTargetAddress()
getTarget().getAddress().>= 0; the target addresspublic int getTargetOffset()
getTargetAddress() - getAddress().public boolean hasTargetOffset()
true if the target offset is known or
false if notCopyright © 2020. All Rights Reserved.