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