Package jminusminus
Class NLIRStore
java.lang.Object
jminusminus.NLIRInstruction
jminusminus.NLIRStore
LIR instruction representing a store from a register to memory.
-
Field Summary
Fields inherited from class jminusminus.NLIRInstruction
block, id, lirMnemonic, reads, write -
Constructor Summary
ConstructorsConstructorDescriptionNLIRStore(NBasicBlock block, int id, int offset, OffsetFrom offsetFrom, NRegister register) Constructs an NLIRStore object. -
Method Summary
Modifier 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
-
NLIRStore
Constructs an NLIRStore object.- Parameters:
block- enclosing block.id- identifier of the instruction.offset- stack offset to store to.offsetFrom- whether offset relative to stack pointer (sp) or frame pointer (fp).register- register to store from.
-
-
Method Details
-
allocatePhysicalRegisters
public void allocatePhysicalRegisters()Replace references to virtual registers in this LIR instruction with references to physical registers.- Overrides:
allocatePhysicalRegistersin classNLIRInstruction
-
toSpim
Translates this LIR instruction into SPIM and writes it out to the specified output stream.- Overrides:
toSpimin classNLIRInstruction- Parameters:
out- output stream for SPIM code.
-
toString
Returns a string representation of this instruction.- Overrides:
toStringin classNLIRInstruction- Returns:
- a string representation of this instruction.
-