abstract class NLIRInstruction extends Object
Modifier and Type | Field and Description |
---|---|
NBasicBlock |
block
The block containing this instruction.
|
int |
id
Unique identifier of this instruction.
|
protected static String[] |
lirMnemonic
Maps JVM opcode to a string mnemonic for LIR instructions.
|
ArrayList<NRegister> |
reads
Registers that store the inputs (if any) of this instruction.
|
NRegister |
write
Register that stores the result (if any) of this instruction.
|
Modifier | Constructor and Description |
---|---|
protected |
NLIRInstruction(NBasicBlock block,
int id)
Construct an NLIRInstruction.
|
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.
|
protected static String[] lirMnemonic
public NBasicBlock block
public int id
public ArrayList<NRegister> reads
public NRegister write
protected NLIRInstruction(NBasicBlock block, int id)
block
- enclosing block.id
- identifier of the instruction.public void allocatePhysicalRegisters()
public void toSpim(PrintWriter out)
out
- output stream for SPIM code.