scale.backend.x86
Class X86RBranch

java.lang.Object
  extended by scale.backend.Instruction
      extended by scale.backend.Branch
          extended by scale.backend.x86.X86Branch
              extended by scale.backend.x86.X86RBranch
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
X86RDBranch, X86RRBranch

public class X86RBranch
extends X86Branch

This is the base class for all X86 branches that reference just a register.

$Id$

Copyright 2008 by James H. Burrill
All Rights Reserved.


Field Summary
protected  int reg
           
 
Fields inherited from class scale.backend.x86.X86Branch
opcode, pt
 
Constructor Summary
X86RBranch(int opcode, boolean pt, int numTargets, int reg)
           
 
Method Summary
 void assembler(Assembler asm, Emit emit)
          Insert the assembler representation of the instruction into the output stream.
protected  boolean checkForm(int opcode)
           
 int getReg()
           
 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 setReg(int reg)
           
 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.X86Branch
assembleDisp, buildAddress, canBeDeleted, defs, getDisplacement, getOpcode, getOperandSize, getOperandSizeLabel, getPt, getReg2, instructionSize, isReversed, isUnconditional, mods, remapDestRegister, setDisplacement, setOpcode, setOperandSize, setReg2, setReturnedStructSize, setScale, specifyRegisterUsage
 
Methods inherited from class scale.backend.Branch
additionalRegsKilled, additionalRegsSet, additionalRegsUsed, addTarget, copy, getBranchProbability, getExecutionCycles, getRegsKilled, getTarget, independent, isBranch, isCall, markAsCall, nullify, numTargets, setBranchProbability, uses
 
Methods inherited from class scale.backend.Instruction
clone, ehash, getBBID, getCopyDest, getCopySrc, getDestRegister, getFunctionalUnit, getLoopNumber, getNext, getPredicate, getPredicates, getSrcRegisters, getTag, isCopy, isLabel, isLoad, isMandatory, isMarker, isPhi, isPredicated, isPredicatedOnTrue, isPrefetch, isSpillInstruction, isSpillLoadPoint, isSpillStorePoint, isStore, markSpillInstruction, nullified, numPredicates, removePredicates, setBBID, setLoopNumber, setMandatory, setNext, setPredicate, setPredicate, setPredicatedOnTrue, setPredicates, setsSpecialReg, setTag, specifyNotSpillLoadPoint, specifySpillStorePoint
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

reg

protected int reg
Constructor Detail

X86RBranch

public X86RBranch(int opcode,
                  boolean pt,
                  int numTargets,
                  int reg)
Method Detail

checkForm

protected boolean checkForm(int opcode)
Overrides:
checkForm in class X86Branch

getReg

public int getReg()
Overrides:
getReg in class X86Branch

setReg

public void setReg(int reg)
Overrides:
setReg in class X86Branch

remapRegisters

public void remapRegisters(int[] map)
Description copied from class: Branch
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 X86Branch
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 X86Branch
Parameters:
oldReg - is the previous source register
newReg - 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 X86Branch

assembler

public void assembler(Assembler asm,
                      Emit emit)
Insert the assembler representation of the instruction into the output stream.

Overrides:
assembler in class X86Branch

toString

public java.lang.String toString()
Overrides:
toString in class X86Branch