|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectscale.backend.Instruction
scale.backend.Branch
scale.backend.sparc.SparcBranch
scale.backend.sparc.BranchInstruction
public class BranchInstruction
This class represents Sparc Branch on condition code instructions.
$Id: BranchInstruction.java,v 1.18 2005-03-24 13:56:52 burrill Exp $
Copyright 2005 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
Instance=02, Op=00, op2=x10
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 |
|---|
| Fields inherited from class scale.backend.sparc.SparcBranch |
|---|
annulled, delaySlot, opcode, pt |
| Constructor Summary | |
|---|---|
BranchInstruction(int opcode,
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 |
| Constructor Detail |
|---|
public BranchInstruction(int opcode,
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 Branchinst - is the specified instruction
public void assembler(Assembler asm,
Emit emit)
assembler in class Instructionpublic java.lang.String toString()
toString in class Branchpublic boolean canBeAnnulled()
canBeAnnulled in class SparcBranchpublic boolean isUnconditional()
isUnconditional in class SparcBranch
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||