scale.backend.x86
Class X86RRRInstruction
java.lang.Object
scale.backend.Instruction
scale.backend.x86.X86Instruction
scale.backend.x86.X86RInstruction
scale.backend.x86.X86RRInstruction
scale.backend.x86.X86RRRInstruction
- All Implemented Interfaces:
- java.lang.Cloneable
- Direct Known Subclasses:
- X86RRRDInstruction
public class X86RRRInstruction
- extends X86RRInstruction
This is the base class for all X86 instructions except branches
that reference three registers.
$Id$
Copyright 2008 by James H. Burrill
All Rights Reserved.
Field Summary |
protected int |
reg3
|
Method Summary |
void |
assembler(Assembler asm,
Emit emit)
Insert the assembler representation of the instruction into the
output stream. |
protected boolean |
checkForm(int opcode)
Return true if the specified form is valid for this instruction
opcode. |
int |
getReg3()
|
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 |
setReg3(int reg3)
|
java.lang.String |
toString()
|
boolean |
uses(int register,
RegisterSet registers)
Return true if the instruction uses the register. |
Methods inherited from class scale.backend.x86.X86Instruction |
assembleDisp, buildAddress, canBeDeleted, getDisplacement, getDisplacement2, getOpcode, getOperandSize, getOperandSizeLabel, getScale, independent, independentCC, instructionSize, isReversed, setDisplacement, setDisplacement2, setOpcode, setOperandSize, setScale, setsCC, setSetCC, setsSpecialReg, setUseCC, usesCC |
Methods inherited from class scale.backend.Instruction |
clone, copy, ehash, getBBID, getCopyDest, getCopySrc, getExecutionCycles, getFunctionalUnit, 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, setTag, specifyNotSpillLoadPoint, specifySpillStorePoint |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
reg3
protected int reg3
X86RRRInstruction
public X86RRRInstruction(int opcode,
int reg,
int reg2,
int reg3)
checkForm
protected boolean checkForm(int opcode)
- Description copied from class:
X86Instruction
- Return true if the specified form is valid for this instruction
opcode.
- Overrides:
checkForm
in class X86RRInstruction
getReg3
public int getReg3()
- Overrides:
getReg3
in class X86Instruction
setReg3
public void setReg3(int reg3)
- Overrides:
setReg3
in class X86Instruction
remapRegisters
public void remapRegisters(int[] map)
- Description copied from class:
Instruction
- Map the virtual registers referenced in the instruction to the
specified real registers. The mapping is specified using an
array that is indexed by the virtual register to return the real
register.
- Overrides:
remapRegisters
in class X86RRInstruction
- Parameters:
map
- maps from the virtual register to real register
remapSrcRegister
public void remapSrcRegister(int oldReg,
int newReg)
- Map the registers used in the instruction as sources to the specified register.
If the register is not used as a source register, no change is made.
- Overrides:
remapSrcRegister
in class X86RRInstruction
- Parameters:
oldReg
- is the previous source registernewReg
- is the new source register
uses
public boolean uses(int register,
RegisterSet registers)
- Return true if the instruction uses the register.
- Overrides:
uses
in class X86RRInstruction
assembler
public void assembler(Assembler asm,
Emit emit)
- Insert the assembler representation of the instruction into the
output stream.
- Overrides:
assembler
in class X86RRInstruction
toString
public java.lang.String toString()
- Overrides:
toString
in class X86RRInstruction