scale.backend.ppc
Class BFormInstruction

java.lang.Object
  extended by scale.backend.Instruction
      extended by scale.backend.Branch
          extended by scale.backend.ppc.PPCBranch
              extended by scale.backend.ppc.BFormInstruction
All Implemented Interfaces:
java.lang.Cloneable

public class BFormInstruction
extends PPCBranch

This class represents Sparc calPowerPC I-form instructions.

$Id: BFormInstruction.java,v 1.8 2007-10-04 19:57:54 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
 
Fields inherited from class scale.backend.ppc.PPCBranch
opcode, pt
 
Constructor Summary
BFormInstruction(int opcode, int bo, int bi, Displacement displacement, int numTargets)
          Create a branch relative that does not set the link register.
BFormInstruction(int opcode, int bo, int bi, Displacement displacement, int numTargets, boolean absolute, boolean link)
           
BFormInstruction(int opcode, int bo, int bi, int numTargets)
           
 
Method Summary
 void assembler(Assembler asm, Emit emit)
          Insert the assembler representation of the instruction into the output stream.
 boolean independent(Instruction inst, RegisterSet registers)
          Return true if this instruction is independent of the specified instruction.
 java.lang.String toString()
           
 
Methods inherited from class scale.backend.ppc.PPCBranch
assembleDisp, canBeAnnulled, canBeDeleted, getOpcode, getPt, instructionSize, isUnconditional, setOpcode
 
Methods inherited from class scale.backend.Branch
additionalRegsKilled, additionalRegsSet, additionalRegsUsed, addTarget, copy, defs, getBranchProbability, getExecutionCycles, getRegsKilled, getTarget, isBranch, isCall, markAsCall, mods, nullify, numTargets, remapDestRegister, remapRegisters, remapSrcRegister, setBranchProbability, specifyRegisterUsage, uses, 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
 

Constructor Detail

BFormInstruction

public BFormInstruction(int opcode,
                        int bo,
                        int bi,
                        int numTargets)

BFormInstruction

public BFormInstruction(int opcode,
                        int bo,
                        int bi,
                        Displacement displacement,
                        int numTargets)
Create a branch relative that does not set the link register.

Parameters:
displacement - is the branch address
numTargets - specifies where the number of branch targets

BFormInstruction

public BFormInstruction(int opcode,
                        int bo,
                        int bi,
                        Displacement displacement,
                        int numTargets,
                        boolean absolute,
                        boolean link)
Parameters:
bo - specifies the bo field of the instruction
bi - specifies the bi field of the instruction
displacement - is the branch address
numTargets - specifies where the number of branch targets
absolute - is true if the displacement represents an absolute address
link - is true if this instruction sets the link register
Method Detail

independent

public boolean independent(Instruction inst,
                           RegisterSet registers)
Return true if this instruction is independent of the specified instruction. If instructions are independent, than one instruction can be moved before or after the other instruction without changing the semantics of the program.

Overrides:
independent in class Branch
Parameters:
inst - is the specified instruction

assembler

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

Specified by:
assembler in class Instruction

toString

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