class NLIRArithmetic extends NLIRInstruction
block, id, lirMnemonic, reads, write
Constructor and Description |
---|
NLIRArithmetic(NBasicBlock block,
int id,
int opcode,
NLIRInstruction lhs,
NLIRInstruction rhs)
Construct an NLIRArithmetic 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 NLIRArithmetic(NBasicBlock block, int id, int opcode, NLIRInstruction lhs, NLIRInstruction rhs)
block
- enclosing block.id
- identifier of the instruction.opcode
- opcode for the arithmetic operator.lhs
- LIR for lhs.rhs
- LIR for rhs.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