class NLIRConditionalJump extends NLIRInstruction
Modifier and Type | Field and Description |
---|---|
NBasicBlock |
onFalseDestination
Block to jump to on false.
|
NBasicBlock |
onTrueDestination
Block to jump to on true.
|
int |
opcode
Test expression opcode.
|
block, id, lirMnemonic, reads, write
Constructor and Description |
---|
NLIRConditionalJump(NBasicBlock block,
int id,
NLIRInstruction lhs,
NLIRInstruction rhs,
int opcode,
NBasicBlock onTrueDestination,
NBasicBlock onFalseDestination)
Construct an NLIRConditionalJump instruction.
|
Modifier and Type | Method and Description |
---|---|
void |
allocatePhysicalRegisters()
Replace references to virtual registers in this LIR instruction with
references to physical registers.
|
void |
toSpim(PrintWriter out)
Translate this LIR instruction into SPIM and write it out to the
specified output stream.
|
String |
toString()
Return a string representation of this instruction.
|
public int opcode
public NBasicBlock onTrueDestination
public NBasicBlock onFalseDestination
public NLIRConditionalJump(NBasicBlock block, int id, NLIRInstruction lhs, NLIRInstruction rhs, int opcode, NBasicBlock onTrueDestination, NBasicBlock onFalseDestination)
block
- enclosing block.id
- identifier of the instruction.lhs
- lhs LIR.rhs
- rhs LIR.opcode
- opcode in the test.onTrueDestination
- block to jump to on true.onFalseDestination
- block to jump to on false.public void allocatePhysicalRegisters()
NLIRInstruction
allocatePhysicalRegisters
in class NLIRInstruction
public void toSpim(PrintWriter out)
NLIRInstruction
toSpim
in class NLIRInstruction
out
- output stream for SPIM code.public String toString()
NLIRInstruction
toString
in class NLIRInstruction