Exemplo n.º 1
0
  /**
   * 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);
  }
Exemplo n.º 2
0
 /** 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;
 }
Exemplo n.º 3
0
 /**
  * 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);
 }
Exemplo n.º 4
0
 public void remapRegisters(int[] map) {
   super.remapRegisters(map);
   if (delaySlot != null) delaySlot.remapRegisters(map);
 }
Exemplo n.º 5
0
 /** toString() helper method. */
 protected final void delayToStringBuf(StringBuffer buf) {
   if (delaySlot != null) {
     buf.append("; ");
     buf.append(delaySlot.toString());
   }
 }
Exemplo n.º 6
0
 /** 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");
 }