|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object scale.backend.Instruction scale.backend.alpha.MemoryInstruction
public abstract class MemoryInstruction
This class represents Alpha memory-format instructions.
$Id: MemoryInstruction.java,v 1.28 2007-10-04 19:57:51 burrill Exp $
Copyright 2007 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
Field Summary | |
---|---|
protected Displacement |
displacement
A symbolic representation of the displacement |
protected int |
opcode
The instruction opcode. |
protected int |
ra
The ra register. |
protected int |
rb
The rb register |
protected int |
relocType
The type of relocation |
Constructor Summary | |
---|---|
protected |
MemoryInstruction(int opcode,
int ra,
int rb,
Displacement displacement)
|
protected |
MemoryInstruction(int opcode,
int ra,
int rb,
Displacement displacement,
int relocType)
|
Method Summary | |
---|---|
void |
assembler(Assembler asm,
Emit emit)
Insert the assembler representation of the instruction into the output stream. |
Displacement |
getDisplacement()
Return the displacement. |
int |
getExecutionCycles()
Return the number of cycles that this instruction requires. |
int |
getFunctionalUnit()
Return the number of the functional unit required to execute this instruction. |
int |
getOpcode()
Return the instructions opcode. |
int |
getRa()
Return the Ra register field. |
int |
getRb()
Return the Rb register field. |
int |
getRelocType()
Return the relocation type. |
boolean |
independent(Instruction inst,
RegisterSet registers)
Return true if this instruction is independent of the specified instruction. |
int |
instructionSize()
Return the number of bytes required for the instruction. |
void |
remapDestRegister(int oldReg,
int newReg)
Map the registers defined in the instruction as destinations to the specified register. |
void |
remapRegisters(int[] map)
Map the virtual registers referenced in the instruction to the specified real registers. |
void |
remapSrcRegister(int oldReg,
int newReg)
Map the registers used in the instruction as sources to the specified register. |
void |
setDisplacement(Displacement disp)
Set the displacement. |
protected void |
setRb(int rb)
Set the Rb register field. |
java.lang.String |
toString()
|
Methods inherited from class scale.backend.Instruction |
---|
canBeDeleted, clone, copy, defs, ehash, getBBID, getCopyDest, getCopySrc, getDestRegister, getLoopNumber, getNext, getPredicate, getPredicates, getSrcRegisters, getTag, isBranch, isCopy, isLabel, isLoad, isMandatory, isMarker, isPhi, isPredicated, isPredicatedOnTrue, isPrefetch, isSpillInstruction, isSpillLoadPoint, isSpillStorePoint, isStore, markSpillInstruction, mods, nullified, nullify, numPredicates, removePredicates, setBBID, setLoopNumber, setMandatory, setNext, setPredicate, setPredicate, setPredicatedOnTrue, setPredicates, setsSpecialReg, setTag, specifyNotSpillLoadPoint, specifyRegisterUsage, specifySpillStorePoint, uses |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int opcode
protected int ra
protected int rb
protected Displacement displacement
protected int relocType
Constructor Detail |
---|
protected MemoryInstruction(int opcode, int ra, int rb, Displacement displacement, int relocType)
protected MemoryInstruction(int opcode, int ra, int rb, Displacement displacement)
Method Detail |
---|
public void remapRegisters(int[] map)
Instruction
remapRegisters
in class Instruction
map
- maps from the virtual register to real registerpublic void remapSrcRegister(int oldReg, int newReg)
remapSrcRegister
in class Instruction
oldReg
- is the previous source registernewReg
- is the new source registerpublic void remapDestRegister(int oldReg, int newReg)
remapDestRegister
in class Instruction
oldReg
- is the previous destination registernewReg
- is the new destination registerpublic int getOpcode()
getOpcode
in class Instruction
public int getRa()
public int getRb()
protected void setRb(int rb)
public final int getRelocType()
public Displacement getDisplacement()
public void setDisplacement(Displacement disp)
public boolean independent(Instruction inst, RegisterSet registers)
independent
in class Instruction
inst
- is the specified instructionpublic int instructionSize()
instructionSize
in class Instruction
public int getExecutionCycles()
getExecutionCycles
in class Instruction
public int getFunctionalUnit()
getFunctionalUnit
in class Instruction
public void assembler(Assembler asm, Emit emit)
assembler
in class Instruction
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |