Package iota
Class NMarvinJump
java.lang.Object
iota.NMarvinInstruction
iota.NMarvinJump
Representation of a jump (conditional or unconditional) instruction.
-
Field Summary
FieldsModifier and TypeFieldDescriptionBlock to jump to on false (null for an unconditional jump and return from a method).int
Program counter of the instruction to jump to.boolean
Whether the jump (if unconditional) is to return from a method.Lhs of the condition (null for an unconditional jump and return from a method).Rhs of the condition (null for an unconditional jump and return from a method).Block to jump to on true (null for return from a method).Fields inherited from class iota.NMarvinInstruction
mnemonic, mnemonic2Op, pc
-
Constructor Summary
ConstructorsConstructorDescriptionNMarvinJump
(String mnemonic, NPhysicalRegister rX, NPhysicalRegister rY, NBasicBlock trueBlock, NBasicBlock falseBlock, boolean returnFromMethod) Constructs an NMarvinJump object for a jump. -
Method Summary
Modifier and TypeMethodDescriptionvoid
write
(PrintWriter out) Writes this instruction to the given output stream.
-
Field Details
-
rX
Lhs of the condition (null for an unconditional jump and return from a method). -
rY
Rhs of the condition (null for an unconditional jump and return from a method). -
trueBlock
Block to jump to on true (null for return from a method). -
falseBlock
Block to jump to on false (null for an unconditional jump and return from a method). -
returnFromMethod
public boolean returnFromMethodWhether the jump (if unconditional) is to return from a method. -
N
public int NProgram counter of the instruction to jump to.
-
-
Constructor Details
-
NMarvinJump
public NMarvinJump(String mnemonic, NPhysicalRegister rX, NPhysicalRegister rY, NBasicBlock trueBlock, NBasicBlock falseBlock, boolean returnFromMethod) Constructs an NMarvinJump object for a jump.- Parameters:
mnemonic
- instruction mnemonic.rX
- lhs of the condition (null for return from method).rY
- rhs of the condition (null for return from method).trueBlock
- block to jump to on true.falseBlock
- block to jump to on false.returnFromMethod
- whether the jump (if unconditional) is to return from a method.
-
-
Method Details
-
write
Writes this instruction to the given output stream.- Specified by:
write
in classNMarvinInstruction
- Parameters:
out
- output stream.
-