コード例 #1
0
ファイル: SparcBranch.java プロジェクト: troore/scale
  /**
   * Specify the registers used by this instruction.
   *
   * @param rs is the register set in use
   * @param index is an index associated with the instruction
   * @param strength is the importance of the instruction
   * @see scale.backend.RegisterAllocator#useRegister(int,int,int)
   * @see scale.backend.RegisterAllocator#defRegister(int,int)
   */
  public void specifyRegisterUsage(RegisterAllocator rs, int index, int strength) {
    super.specifyRegisterUsage(rs, index, strength);

    if (annulled) return; // Annulled instructions are processed as part of an AnnulMarker.

    if (delaySlot != null) delaySlot.specifyRegisterUsage(rs, index, strength);
  }
コード例 #2
0
ファイル: SparcBranch.java プロジェクト: troore/scale
 /** Return true if the instruction sets the register. */
 public boolean defs(int register, RegisterSet registers) {
   if (super.defs(register, registers)) return true;
   if (delaySlot != null) return delaySlot.defs(register, registers);
   return false;
 }
コード例 #3
0
ファイル: SparcBranch.java プロジェクト: troore/scale
 /**
  * Map the registers defined in the instruction as destinations to the specified register. If the
  * register is not used as a destination register, no change is made.
  *
  * @param oldReg is the previous destination register
  * @param newReg is the new destination register
  */
 public void remapDestRegister(int oldReg, int newReg) {
   super.remapDestRegister(oldReg, newReg);
   if (delaySlot != null) delaySlot.remapDestRegister(oldReg, newReg);
 }
コード例 #4
0
ファイル: SparcBranch.java プロジェクト: troore/scale
 public void remapRegisters(int[] map) {
   super.remapRegisters(map);
   if (delaySlot != null) delaySlot.remapRegisters(map);
 }
コード例 #5
0
ファイル: SparcBranch.java プロジェクト: troore/scale
 /** toString() helper method. */
 protected final void delayToStringBuf(StringBuffer buf) {
   if (delaySlot != null) {
     buf.append("; ");
     buf.append(delaySlot.toString());
   }
 }
コード例 #6
0
ファイル: SparcBranch.java プロジェクト: troore/scale
 /** Assemble the delay slot instruction. */
 protected final void assembleDelay(Assembler asm, Emit emit) {
   emit.endLine();
   emit.emit('\t');
   if (delaySlot != null) delaySlot.assembler(asm, emit);
   else emit.emit("nop");
 }