Package jminusminus
Class NLIRArithmetic
java.lang.Object
jminusminus.NLIRInstruction
jminusminus.NLIRArithmetic
LIR instruction corresponding to the JVM arithmetic instructions.
- 
Field SummaryFields inherited from class jminusminus.NLIRInstructionblock, id, lirMnemonic, reads, write
- 
Constructor SummaryConstructorsConstructorDescriptionNLIRArithmetic(NBasicBlock block, int id, int opcode, NLIRInstruction lhs, NLIRInstruction rhs) Constructs an NLIRArithmetic object.
- 
Method SummaryModifier and TypeMethodDescriptionvoidReplace references to virtual registers in this LIR instruction with references to physical registers.voidtoSpim(PrintWriter out) Translates this LIR instruction into SPIM and writes it out to the specified output stream.toString()Returns a string representation of this instruction.
- 
Constructor Details- 
NLIRArithmeticpublic NLIRArithmetic(NBasicBlock block, int id, int opcode, NLIRInstruction lhs, NLIRInstruction rhs) Constructs an NLIRArithmetic object.- Parameters:
- block- enclosing block.
- id- identifier of the instruction.
- opcode- opcode for the arithmetic operator.
- lhs- LIR for lhs.
- rhs- LIR for rhs.
 
 
- 
- 
Method Details- 
allocatePhysicalRegisterspublic void allocatePhysicalRegisters()Replace references to virtual registers in this LIR instruction with references to physical registers.- Overrides:
- allocatePhysicalRegistersin class- NLIRInstruction
 
- 
toSpimTranslates this LIR instruction into SPIM and writes it out to the specified output stream.- Overrides:
- toSpimin class- NLIRInstruction
- Parameters:
- out- output stream for SPIM code.
 
- 
toStringReturns a string representation of this instruction.- Overrides:
- toStringin class- NLIRInstruction
- Returns:
- a string representation of this instruction.
 
 
-