|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object scale.backend.Instruction scale.backend.Branch scale.backend.sparc.SparcBranch scale.backend.sparc.BranchCCInstruction
public class BranchCCInstruction
This class represents Sparc Branch on CC register instructions.
$Id: BranchCCInstruction.java,v 1.18 2007-10-04 19:57:56 burrill Exp $
Copyright 2007 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
Instance=03, Op=00, op2=x01
It is important that the branch target always be target 0 and the fall through target be target 1.
Branch.addTarget(scale.backend.Label, int)
Field Summary | |
---|---|
protected int |
cc
The condition code. |
protected Displacement |
displacement
The displacement. |
Fields inherited from class scale.backend.sparc.SparcBranch |
---|
annulled, delaySlot, opcode, pt |
Constructor Summary | |
---|---|
BranchCCInstruction(int opcode,
int cc,
Displacement displacement,
boolean annulled,
int numTargets,
SparcInstruction delaySlot)
|
Method Summary | |
---|---|
void |
assembler(Assembler asm,
Emit emit)
Insert the assembler representation of the instruction into the output stream. |
boolean |
canBeAnnulled()
Return true if the branch can be annulled. |
boolean |
independent(Instruction inst,
RegisterSet registers)
Return true if this instruction is independent of the specified instruction. |
boolean |
isUnconditional()
Return true if the branch is an unconditional transfer of control to a new address. |
void |
setDisplacement(Displacement displacement)
After all of the instructions have been created, the Sparc Branch displacements must be calculated. |
java.lang.String |
toString()
|
Methods inherited from class scale.backend.sparc.SparcBranch |
---|
assembleDelay, assembleDisp, canBeDeleted, defs, delayToStringBuf, getAnnulled, getDelaySlot, getOpcode, getPt, instructionSize, mods, remapDestRegister, remapRegisters, remapSrcRegister, setAnnulled, setDelaySlot, setOpcode, setReturnedStructSize, specifyRegisterUsage, uses |
Methods inherited from class scale.backend.Branch |
---|
additionalRegsKilled, additionalRegsSet, additionalRegsUsed, addTarget, copy, getBranchProbability, getExecutionCycles, getRegsKilled, getTarget, isBranch, isCall, markAsCall, nullify, numTargets, setBranchProbability, uses |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Displacement displacement
protected int cc
Constructor Detail |
---|
public BranchCCInstruction(int opcode, int cc, Displacement displacement, boolean annulled, int numTargets, SparcInstruction delaySlot)
Method Detail |
---|
public void setDisplacement(Displacement displacement)
public boolean independent(Instruction inst, RegisterSet registers)
independent
in class Branch
inst
- is the specified instructionpublic void assembler(Assembler asm, Emit emit)
assembler
in class Instruction
public java.lang.String toString()
toString
in class Branch
public boolean canBeAnnulled()
canBeAnnulled
in class SparcBranch
public boolean isUnconditional()
isUnconditional
in class SparcBranch
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |