Package jminusminus
Class NLIRInstruction
java.lang.Object
jminusminus.NLIRInstruction
- Direct Known Subclasses:
- NLIRALoad,- NLIRArithmetic,- NLIRAStore,- NLIRConditionalJump,- NLIRGetField,- NLIRGoto,- NLIRIntConstant,- NLIRInvoke,- NLIRLoad,- NLIRLoadLocal,- NLIRMove,- NLIRNewArray,- NLIRPhiFunction,- NLIRPutField,- NLIRReturn,- NLIRStore,- NLIRStringConstant
This abstract base class provides a low-level intermediate representation (LIR) of a JVM
 instruction.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionThe block containing this instruction.intUnique identifier of this instruction.protected static String[]Maps JVM opcode to a string mnemonic for LIR instructions.Registers that store the inputs (if any) of this instruction.Register that stores the result (if any) of this instruction.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedNLIRInstruction(NBasicBlock block, int id) Constructs an NLIRInstruction 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.
- 
Field Details- 
lirMnemonicMaps JVM opcode to a string mnemonic for LIR instructions. For example, imul is mapped to the "MUL".
- 
blockThe block containing this instruction.
- 
idpublic int idUnique identifier of this instruction.
- 
readsRegisters that store the inputs (if any) of this instruction.
- 
writeRegister that stores the result (if any) of this instruction.
 
- 
- 
Constructor Details- 
NLIRInstructionConstructs an NLIRInstruction object.- Parameters:
- block- enclosing block.
- id- identifier of the instruction.
 
 
- 
- 
Method Details- 
allocatePhysicalRegisterspublic void allocatePhysicalRegisters()Replace references to virtual registers in this LIR instruction with references to physical registers.
- 
toSpimTranslates this LIR instruction into SPIM and writes it out to the specified output stream.- Parameters:
- out- output stream for SPIM code.
 
- 
toStringReturns a string representation of this instruction.
 
-