sa-jdi

sion:    0.7.1
 */
package sun.jvm.hotspot.asm.sparc;

import sun.jvm.hotspot.utilities.Assert;

public class SPARCFloatRegisters
{
  public static int getNumRegisters()
  {
    return 64;
  }
  
  public static SPARCFloatRegister getRegister(int i)
  {
    Assert.that((i >= 0) && (i < 64), "float register number is invalid");
    return registers[i];
  }
  
  public static String getRegisterName(int i)
  {
    return "%f" + i;
  }
  
  public static final SPARCFloatRegister F0 = new SPARCFloatRegister(0);
  public static final SPARCFloatRegister F1 = new SPARCFloatRegister(1);
  public static final SPARCFloatRegister F2 = new SPARCFloatRegister(2);
  public static final SPARCFloatRegister F3 = new SPARCFloatRegister(3);
  public static final SPARCFloatRegister F4 = new SPARCFloatRegister(4);
  public static final SPARCFloatRegister F5 = new SPARCFloatRegister(5);
  public static final SPARCFloatRegister F6 = new SPARCFloatRegister(6);
  public static final SPARCFloatRegister F7 = new SPARCFloatRegister(7);
  public static final SPARCFloatRegister F8 = new SPARCFloatRegister(8);
  public static final SPARCFloatRegister F9 = new SPARCFloatRegister(9);
  public static final SPARCFloatRegister F10 = new SPARCFloatRegister(10);
  public static final SPARCFloatRegister F11 = new SPARCFloatRegister(11);
  public static final SPARCFloatRegister F12 = new SPARCFloatRegister(12);
  public static final SPARCFloatRegister F13 = new SPARCFloatRegister(13);
  public static final SPARCFloatRegister F14 = new SPARCFloatRegister(14);
  public static final SPARCFloatRegister F15 = new SPARCFloatRegister(15);
  public static final SPARCFloatRegister F16 = new SPARCFloatRegister(16);
  public static final SPARCFloatRegister F17 = new SPARCFloatRegister(17);
  public static final SPARCFloatRegister F18 = new SPARCFloatRegister(18);
  public static final SPARCFloatRegister F19 = new SPARCFloatRegister(19);
  public static final SPARCFloatRegister F20 = new SPARCFloatRegister(20);
  public static final SPARCFloatRegister F21 = new SPARCFloatRegister(21);
  public static final SPARCFloatRegister F22 = new SPARCFloatRegister(22);
  public static final SPARCFloatRegister F23 = new SPARCFloatRegister(23);
  public static final SPARCFloatRegister F24 = new SPARCFloatRegister(24);
  public static final SPARCFloatRegister F25 = new SPARCFloatRegister(25);
  public static final SPARCFloatRegister F26 = new SPARCFloatRegister(26);
  public static final SPARCFloatRegister F27 = new SPARCFloatRegister(27);
  public static final SPARCFloatRegister F28 = new SPARCFloatRegister(28);
  public static final SPARCFloatRegister F29 = new SPARCFloatRegister(29);
  public static final SPARCFloatRegister F30 = new SPARCFloatRegister(30);
  public static final SPARCFloatRegister F31 = new SPARCFloatRegister(31);
  public static final SPARCFloatRegister F32 = new SPARCFloatRegister(32);
  public static final SPARCFloatRegister F34 = new SPARCFloatRegister(34);
  public static final SPARCFloatRegister F36 = new SPARCFloatRegister(36);
  public static final SPARCFloatRegister F38 = new SPARCFloatRegister(38);
  public static final SPARCFloatRegister F40 = new SPARCFloatRegister(40);
  public static final SPARCFloatRegister F42 = new SPARCFloatRegister(42);
  public static final SPARCFloatRegister F44 = new SPARCFloatRegister(44);
  public static final SPARCFloatRegister F46 = new SPARCFloatRegister(46);
  public static final SPARCFloatRegister F48 = new SPARCFloatRegister(48);
  public static final SPARCFloatRegister F50 = new SPARCFloatRegister(50);
  public static final SPARCFloatRegister F52 = new SPARCFloatRegister(52);
  public static final SPARCFloatRegister F54 = new SPARCFloatRegister(54);
  public static final SPARCFloatRegister F56 = new SPARCFloatRegister(56);
  public static final SPARCFloatRegister F58 = new SPARCFloatRegister(58);
  public static final SPARCFloatRegister F60 = new SPARCFloatRegister(60);
  public static final SPARCFloatRegister F62 = new SPARCFloatRegister(62);
  public static final int NUM_REGISTERS = 64;
  private static final SPARCFloatRegister[] registers = { F0, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, F25, F26, F27, F28, F29, F30, F31, F32, null, F34, null, F36, null, F38, null, F40, null, F42, null, F44, null, F46, null, F48, null, F50, null, F52, null, F54, null, F56, null, F58, null, F60, null, F62, null };
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.sparc.SPARCFloatRegisters
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.asm.sparc;

import sun.jvm.hotspot.asm.SymbolFinder;

public class SPARCFlushInstruction
  extends SPARCInstruction
{
  protected final SPARCRegisterIndirectAddress addr;
  final String description;
  
  public SPARCFlushInstruction(SPARCRegisterIndirectAddress addr)
  {
    super("flush");
    this.addr = addr;
    description = initDescription();
  }
  
  private String initDescription()
  {
    StringBuffer buf = new StringBuffer();
    buf.append(getName());
    buf.append(spaces);
    buf.append(addr.toString());
    return buf.toString();
  }
  
  public String asString(long currentPc, SymbolFinder symFinder)
  {
    return description;
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.sparc.SPARCFlushInstruction
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.asm.sparc;

import sun.jvm.hotspot.asm.Immediate;
import sun.jvm.hotspot.asm.ImmediateOrRegister;
import sun.jvm.hotspot.asm.SymbolFinder;

public abstract class SPARCFormat3AInstruction
  extends SPARCInstruction
{
  protected final int opcode;
  protected final SPARCRegister rs1;
  protected final ImmediateOrRegister operand2;
  protected final SPARCRegister rd;
  
  public SPARCFormat3AInstruction(String name, int opcode, SPARCRegister rs1, ImmediateOrRegister operand2, SPARCRegister rd)
  {
    super(name);
    this.opcode = opcode;
    this.rs1 = rs1;
    this.operand2 = operand2;
    this.rd = rd;
  }
  
  protected String getOperand2String()
  {
    StringBuffer buf = new StringBuffer();
    if (operand2.isRegister())
    {
      buf.append(operand2.toString());
    }
    else
    {
      Number number = ((Immediate)operand2).getNumber();
      buf.append("0x");
      buf.append(Integer.toHexString(number.intValue()));
    }
    return buf.toString();
  }
  
  protected String getDescription()
  {
    StringBuffer buf = new StringBuffer();
    buf.append(getName());
    buf.append(spaces);
    buf.append(rs1.toString());
    buf.append(comma);
    buf.append(getOperand2String());
    buf.append(comma);
    buf.append(rd.toString());
    return buf.toString();
  }
  
  public String asString(long currentPc, SymbolFinder symFinder)
  {
    return getDescription();
  }
  
  public int getOpcode()
  {
    return opcode;
  }
  
  public SPARCRegister getDestinationRegister()
  {
    return rd;
  }
  
  public ImmediateOrRegister getOperand2()
  {
    return operand2;
  }
  
  public SPARCRegister getSourceRegister1()
  {
    return rs1;
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.sparc.SPARCFormat3AInstruction
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.asm.sparc;

import sun.jvm.hotspot.asm.SymbolFinder;

public class SPARCFP2RegisterInstruction
  extends SPARCInstruction
{
  final SPARCFloatRegister rs;
  final SPARCFloatRegister rd;
  final int opf;
  
  public SPARCFP2RegisterInstruction(String name, int opf, SPARCFloatRegister rs, SPARCFloatRegister rd)
  {
    super(name);
    this.rs = rs;
    this.rd = rd;
    this.opf = opf;
  }
  
  public String asString(long currentPc, SymbolFinder symFinder)
  {
    return getDescription();
  }
  
  protected String getDescription()
  {
    StringBuffer buf = new StringBuffer();
    buf.append(getName());
    buf.append(spaces);
    buf.append(rs.toString());
    buf.append(comma);
    buf.append(rd.toString());
    
    return buf.toString();
  }
  
  public boolean isFloat()
  {
    return true;
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.sparc.SPARCFP2RegisterInstruction
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.asm.sparc;

import sun.jvm.hotspot.asm.ArithmeticInstruction;
import sun.jvm.hotspot.asm.Operand;

public class SPARCFPArithmeticInstruction
  extends SPARCFormat3AInstruction
  implements ArithmeticInstruction
{
  private final SPARCRegister rs2;
  private final int rtlOperation;
  
  public SPARCFPArithmeticInstruction(String name, int opcode, int rtlOperation, SPARCRegister rs1, SPARCRegister rs2, SPARCRegister rd)
  {
    super(name, opcode, rs1, rs2, rd);
    this.rs2 = rs2;
    this.rtlOperation = rtlOperation;
  }
  
  protected String getDescription()
  {
    StringBuffer buf = new StringBuffer();
    buf.append(getName());
    buf.append(spaces);
    buf.append(rs1.toString());
    buf.append(comma);
    buf.append(rs2.toString());
    buf.append(comma);
    buf.append(rd.toString());
    return buf.toString();
  }
  
  public int getOperation()
  {
    return rtlOperation;
  }
  
  public Operand[] getArithmeticSources()
  {
    return new Operand[] { rs1, rs2 };
  }
  
  public Operand getArithmeticDestination()
  {
    return rd;
  }
  
  public boolean isFloat()
  {
    return true;
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.sparc.SPARCFPArithmeticInstruction
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.asm.sparc;

import sun.jvm.hotspot.asm.ImmediateOrRegister;
import sun.jvm.hotspot.asm.MoveInstruction;
import sun.jvm.hotspot.asm.Register;

public class SPARCFPMoveInstruction
  extends SPARCFP2RegisterInstruction
  implements MoveInstruction
{
  public SPARCFPMoveInstruction(String name, int opf, SPARCFloatRegister rs, SPARCFloatRegister rd)
  {
    super(name, opf, rs, rd);
  }
  
  public Register getMoveDestination()
  {
    return rd;
  }
  
  public ImmediateOrRegister getMoveSource()
  {
    return rs;
  }
  
  public int getMoveOpcode()
  {
    return opf;
  }
  
  public boolean isConditional()
  {
    return false;
  }
  
  public boolean isMove()
  {
    return true;
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.sparc.SPARCFPMoveInstruction
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.asm.sparc;

import sun.jvm.hotspot.asm.CPUHelper;
import sun.jvm.hotspot.asm.Disassembler;
import sun.jvm.hotspot.asm.Register;

public class SPARCHelper
  implements CPUHelper
{
  public Disassembler createDisassembler(long startPc, byte[] code)
  {
    return new SPARCV9Disassembler(startPc, code);
  }
  
  public Register getIntegerRegister(int num)
  {
    return SPARCRegisters.getRegister(num);
  }
  
  public Register getFloatRegister(int num)
  {
    return SPARCFloatRegisters.getRegister(num);
  }
  
  public Register getStackPointer()
  {
    return SPARCRegisters.O7;
  }
  
  public Register getFramePointer()
  {
    return SPARCRegisters.I7;
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.sparc.SPARCHelper
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.asm.sparc;

import sun.jvm.hotspot.asm.SymbolFinder;

public final class SPARCIllegalInstruction
  extends SPARCInstruction
{
  private final int instruction;
  private final String description;
  
  public SPARCIllegalInstruction(int instruction)
  {
    super("illegal");
    this.instruction = instruction;
    description = ("bad opcode - " + Integer.toHexString(instruction));
  }
  
  public String asString(long currentPc, SymbolFinder symFinder)
  {
    return description;
  }
  
  public int getInstruction()
  {
    return instruction;
  }
  
  public boolean isIllegal()
  {
    return true;
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.sparc.SPARCIllegalInstruction
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.asm.sparc;

import sun.jvm.hotspot.asm.CallInstruction;

public class SPARCIndirectCallInstruction
  extends SPARCJmplInstruction
  implements CallInstruction
{
  public SPARCIndirectCallInstruction(SPARCRegisterIndirectAddress addr, SPARCRegister rd)
  {
    super("call", addr, rd);
  }
  
  protected String getDescription()
  {
    StringBuffer buf = new StringBuffer();
    buf.append(getName());
    buf.append(spaces);
    
    String addrStr = addr.toString();
    buf.append(addrStr.substring(1, addrStr.length() - 1));
    return buf.toString();
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.sparc.SPARCIndirectCallInstruction
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.asm.sparc;

import sun.jvm.hotspot.asm.AbstractInstruction;

public abstract class SPARCInstruction
  extends AbstractInstruction
  implements SPARCOpcodes
{
  public SPARCInstruction(String name)
  {
    super(name);
  }
  
  public int getSize()
  {
    return 4;
  }
  
  protected static String comma = ", ";
  protected static String spaces = "\t";
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.sparc.SPARCInstruction
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.asm.sparc;

import sun.jvm.hotspot.asm.ImmediateOrRegister;
import sun.jvm.hotspot.asm.PCRelativeAddress;

public abstract interface SPARCInstructionFactory
{
  public abstract SPARCInstruction newCallInstruction(PCRelativeAddress paramPCRelativeAddress);
  
  public abstract SPARCInstruction newNoopInstruction();
  
  public abstract SPARCInstruction newSethiInstruction(int paramInt, SPARCRegister paramSPARCRegister);
  
  public abstract SPARCInstruction newUnimpInstruction(int paramInt);
  
  public abstract SPARCInstruction newBranchInstruction(String paramString, PCRelativeAddress paramPCRelativeAddress, boolean paramBoolean, int paramInt);
  
  public abstract SPARCInstruction newSpecialLoadInstruction(String paramString, int paramInt1, int paramInt2, SPARCRegisterIndirectAddress paramSPARCRegisterIndirectAddress);
  
  public abstract SPARCInstruction newSpecialStoreInstruction(String paramString, int paramInt1, int paramInt2, SPARCRegisterIndirectAddress paramSPARCRegisterIndirectAddress);
  
  public abstract SPARCInstruction newLoadInstruction(String paramString, int paramInt1, SPARCRegisterIndirectAddress paramSPARCRegisterIndirectAddress, SPARCRegister paramSPARCRegister, int paramInt2);
  
  public abstract SPARCInstruction newStoreInstruction(String paramString, int paramInt1, SPARCRegisterIndirectAddress paramSPARCRegisterIndirectAddress, SPARCRegister paramSPARCRegister, int paramInt2);
  
  public abstract SPARCInstruction newStbarInstruction();
  
  public abstract SPARCInstruction newReadInstruction(int paramInt1, int paramInt2, SPARCRegister paramSPARCRegister);
  
  public abstract SPARCInstruction newWriteInstruction(int paramInt1, int paramInt2, SPARCRegister paramSPARCRegister, ImmediateOrRegister paramImmediateOrRegister);
  
  public abstract SPARCInstruction newIllegalInstruction(int paramInt);
  
  public abstract SPARCInstruction newIndirectCallInstruction(SPARCRegisterIndirectAddress paramSPARCRegisterIndirectAddress, SPARCRegister paramSPARCRegister);
  
  public abstract SPARCInstruction newReturnInstruction(SPARCRegisterIndirectAddress paramSPARCRegisterIndirectAddress, SPARCRegister paramSPARCRegister, boolean paramBoolean);
  
  public abstract SPARCInstruction newJmplInstruction(SPARCRegisterIndirectAddress paramSPARCRegisterIndirectAddress, SPARCRegister paramSPARCRegister);
  
  public abstract SPARCInstruction newFP2RegisterInstruction(String paramString, int paramInt, SPARCFloatRegister paramSPARCFloatRegister1, SPARCFloatRegister paramSPARCFloatRegister2);
  
  public abstract SPARCInstruction newFPMoveInstruction(String paramString, int paramInt, SPARCFloatRegister paramSPARCFloatRegister1, SPARCFloatRegister paramSPARCFloatRegister2);
  
  public abstract SPARCInstruction newFPArithmeticInstruction(String paramString, int paramInt1, int paramInt2, SPARCFloatRegister paramSPARCFloatRegister1, SPARCFloatRegister paramSPARCFloatRegister2, SPARCFloatRegister paramSPARCFloatRegister3);
  
  public abstract SPARCInstruction newFlushInstruction(SPARCRegisterIndirectAddress paramSPARCRegisterIndirectAddress);
  
  public abstract SPARCInstruction newSaveInstruction(SPARCRegister paramSPARCRegister1, ImmediateOrRegister paramImmediateOrRegister, SPARCRegister paramSPARCRegister2);
  
  public abstract SPARCInstruction newRestoreInstruction(SPARCRegister paramSPARCRegister1, ImmediateOrRegister paramImmediateOrRegister, SPARCRegister paramSPARCRegister2);
  
  public abstract SPARCInstruction newTrapInstruction(String paramString, int paramInt);
  
  public abstract SPARCInstruction newRettInstruction(SPARCRegisterIndirectAddress paramSPARCRegisterIndirectAddress);
  
  public abstract SPARCInstruction newArithmeticInstruction(String paramString, int paramInt1, int paramInt2, SPARCRegister paramSPARCRegister1, ImmediateOrRegister paramImmediateOrRegister, SPARCRegister paramSPARCRegister2);
  
  public abstract SPARCInstruction newLogicInstruction(String paramString, int paramInt1, int paramInt2, SPARCRegister paramSPARCRegister1, ImmediateOrRegister paramImmediateOrRegister, SPARCRegister paramSPARCRegister2);
  
  public abstract SPARCInstruction newMoveInstruction(String paramString, int paramInt, ImmediateOrRegister paramImmediateOrRegister, SPARCRegister paramSPARCRegister);
  
  public abstract SPARCInstruction newShiftInstruction(String paramString, int paramInt1, int paramInt2, SPARCRegister paramSPARCRegister1, ImmediateOrRegister paramImmediateOrRegister, SPARCRegister paramSPARCRegister2);
  
  public abstract SPARCInstruction newCoprocessorInstruction(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6);
  
  public abstract SPARCInstruction newSwapInstruction(String paramString, SPARCRegisterIndirectAddress paramSPARCRegisterIndirectAddress, SPARCRegister paramSPARCRegister);
  
  public abstract SPARCInstruction newLdstubInstruction(String paramString, SPARCRegisterIndirectAddress paramSPARCRegisterIndirectAddress, SPARCRegister paramSPARCRegister);
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.sparc.SPARCInstructionFactory
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.asm.sparc;

import sun.jvm.hotspot.asm.ImmediateOrRegister;
import sun.jvm.hotspot.asm.PCRelativeAddress;

public class SPARCInstructionFactoryImpl
  implements SPARCInstructionFactory
{
  public SPARCInstruction newCallInstruction(PCRelativeAddress addr)
  {
    return new SPARCCallInstruction(addr);
  }
  
  public SPARCInstruction newNoopInstruction()
  {
    return new SPARCNoopInstruction();
  }
  
  public SPARCInstruction newSethiInstruction(int imm22, SPARCRegister rd)
  {
    return new SPARCSethiInstruction(imm22, rd);
  }
  
  public SPARCInstruction newUnimpInstruction(int const22)
  {
    return new SPARCUnimpInstruction(const22);
  }
  
  public SPARCInstruction newBranchInstruction(String name, PCRelativeAddress addr, boolean isAnnuled, int conditionCode)
  {
    return new SPARCBranchInstruction(name, addr, isAnnuled, conditionCode);
  }
  
  public SPARCInstruction newSpecialLoadInstruction(String name, int specialReg, int cregNum, SPARCRegisterIndirectAddress addr)
  {
    return new SPARCSpecialLoadInstruction(name, specialReg, cregNum, addr);
  }
  
  public SPARCInstruction newSpecialStoreInstruction(String name, int specialReg, int cregNum, SPARCRegisterIndirectAddress addr)
  {
    return new SPARCSpecialStoreInstruction(name, specialReg, cregNum, addr);
  }
  
  public SPARCInstruction newLoadInstruction(String name, int opcode, SPARCRegisterIndirectAddress addr, SPARCRegister rd, int dataType)
  {
    return new SPARCLoadInstruction(name, opcode, addr, rd, dataType);
  }
  
  public SPARCInstruction newStoreInstruction(String name, int opcode, SPARCRegisterIndirectAddress addr, SPARCRegister rd, int dataType)
  {
    return new SPARCStoreInstruction(name, opcode, addr, rd, dataType);
  }
  
  public SPARCInstruction newStbarInstruction()
  {
    return new SPARCStbarInstruction();
  }
  
  public SPARCInstruction newReadInstruction(int specialReg, int asrRegNum, SPARCRegister rd)
  {
    return new SPARCReadInstruction(specialReg, asrRegNum, rd);
  }
  
  public SPARCInstruction newWriteInstruction(int specialReg, int asrRegNum, SPARCRegister rs1, ImmediateOrRegister operand2)
  {
    return new SPARCWriteInstruction(specialReg, asrRegNum, rs1, operand2);
  }
  
  public SPARCInstruction newIllegalInstruction(int instruction)
  {
    return new SPARCIllegalInstruction(instruction);
  }
  
  public SPARCInstruction newIndirectCallInstruction(SPARCRegisterIndirectAddress addr, SPARCRegister rd)
  {
    return new SPARCIndirectCallInstruction(addr, rd);
  }
  
  public SPARCInstruction newReturnInstruction(SPARCRegisterIndirectAddress addr, SPARCRegister rd, boolean isLeaf)
  {
    return new SPARCReturnInstruction(addr, rd, isLeaf);
  }
  
  public SPARCInstruction newJmplInstruction(SPARCRegisterIndirectAddress addr, SPARCRegister rd)
  {
    return new SPARCJmplInstruction(addr, rd);
  }
  
  public SPARCInstruction newFPArithmeticInstruction(String name, int opf, int rtlOperation, SPARCFloatRegister rs1, SPARCFloatRegister rs2, SPARCFloatRegister rd)
  {
    return new SPARCFPArithmeticInstruction(name, opf, rtlOperation, rs1, rs2, rd);
  }
  
  public SPARCInstruction newFPMoveInstruction(String name, int opf, SPARCFloatRegister rs, SPARCFloatRegister rd)
  {
    return new SPARCFPMoveInstruction(name, opf, rs, rd);
  }
  
  public SPARCInstruction newFP2RegisterInstruction(String name, int opf, SPARCFloatRegister rs, SPARCFloatRegister rd)
  {
    return new SPARCFP2RegisterInstruction(name, opf, rs, rd);
  }
  
  public SPARCInstruction newFlushInstruction(SPARCRegisterIndirectAddress addr)
  {
    return new SPARCFlushInstruction(addr);
  }
  
  public SPARCInstruction newSaveInstruction(SPARCRegister rs1, ImmediateOrRegister operand2, SPARCRegister rd)
  {
    return new SPARCSaveInstruction(rs1, operand2, rd);
  }
  
  public SPARCInstruction newRestoreInstruction(SPARCRegister rs1, ImmediateOrRegister operand2, SPARCRegister rd)
  {
    return new SPARCRestoreInstruction(rs1, operand2, rd);
  }
  
  public SPARCInstruction newTrapInstruction(String name, int conditionCode)
  {
    return new SPARCTrapInstruction(name, conditionCode);
  }
  
  public SPARCInstruction newRettInstruction(SPARCRegisterIndirectAddress addr)
  {
    return new SPARCRettInstruction(addr);
  }
  
  public SPARCInstruction newArithmeticInstruction(String name, int opcode, int rtlOperation, SPARCRegister rs1, ImmediateOrRegister operand2, SPARCRegister rd)
  {
    return new SPARCArithmeticInstruction(name, opcode, rtlOperation, rs1, operand2, rd);
  }
  
  public SPARCInstruction newLogicInstruction(String name, int opcode, int rtlOperation, SPARCRegister rs1, ImmediateOrRegister operand2, SPARCRegister rd)
  {
    return new SPARCLogicInstruction(name, opcode, rtlOperation, rs1, operand2, rd);
  }
  
  public SPARCInstruction newMoveInstruction(String name, int opcode, ImmediateOrRegister operand2, SPARCRegister rd)
  {
    return new SPARCMoveInstruction(name, opcode, operand2, rd);
  }
  
  public SPARCInstruction newShiftInstruction(String name, int opcode, int rtlOperation, SPARCRegister rs1, ImmediateOrRegister operand2, SPARCRegister rd)
  {
    return new SPARCShiftInstruction(name, opcode, rtlOperation, rs1, operand2, rd);
  }
  
  public SPARCInstruction newCoprocessorInstruction(int instruction, int cpopcode, int opcode, int rs1Num, int rs2Num, int rd)
  {
    return new SPARCIllegalInstruction(instruction);
  }
  
  public SPARCInstruction newSwapInstruction(String name, SPARCRegisterIndirectAddress addr, SPARCRegister rd)
  {
    return new SPARCSwapInstruction(name, addr, rd);
  }
  
  public SPARCInstruction newLdstubInstruction(String name, SPARCRegisterIndirectAddress addr, SPARCRegister rd)
  {
    return new SPARCLdstubInstruction(name, addr, rd);
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.sparc.SPARCInstructionFactoryImpl
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.asm.sparc;

import sun.jvm.hotspot.asm.Address;
import sun.jvm.hotspot.asm.BranchInstruction;
import sun.jvm.hotspot.asm.SymbolFinder;

public class SPARCJmplInstruction
  extends SPARCInstruction
  implements BranchInstruction
{
  protected final SPARCRegisterIndirectAddress addr;
  protected final SPARCRegister rd;
  
  protected SPARCJmplInstruction(String name, SPARCRegisterIndirectAddress addr, SPARCRegister rd)
  {
    super(name);
    this.addr = addr;
    this.rd = rd;
  }
  
  public SPARCJmplInstruction(SPARCRegisterIndirectAddress addr, SPARCRegister rd)
  {
    this("jmpl", addr, rd);
  }
  
  protected String getDescription()
  {
    StringBuffer buf = new StringBuffer();
    String addrStr = addr.toString();
    
    addrStr = addrStr.substring(1, addrStr.length() - 1);
    if (rd == SPARCRegisters.G0)
    {
      buf.append("jmp");
      buf.append(spaces);
      buf.append(addrStr);
    }
    else
    {
      buf.append(getName());
      buf.append(spaces);
      buf.append(addrStr);
      buf.append(comma);
      buf.append(rd.toString());
    }
    return buf.toString();
  }
  
  public String asString(long currentPc, SymbolFinder symFinder)
  {
    return getDescription();
  }
  
  public Address getBranchDestination()
  {
    return addr;
  }
  
  public SPARCRegister getReturnAddressRegister()
  {
    return rd;
  }
  
  public boolean isAnnuledBranch()
  {
    return false;
  }
  
  public boolean isBranch()
  {
    return true;
  }
  
  public boolean isConditional()
  {
    return false;
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.sparc.SPARCJmplInstruction
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.asm.sparc;

public class SPARCLdstubInstruction
  extends SPARCAtomicLoadStoreInstruction
{
  public SPARCLdstubInstruction(String name, SPARCRegisterIndirectAddress addr, SPARCRegister rd)
  {
    super(name, addr, rd);
  }
  
  public int getDataType()
  {
    return 1;
  }
  
  public boolean isConditional()
  {
    return false;
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.sparc.SPARCLdstubInstruction
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.asm.sparc;

import sun.jvm.hotspot.asm.Address;
import sun.jvm.hotspot.asm.LoadInstruction;
import sun.jvm.hotspot.asm.Register;

public class SPARCLoadInstruction
  extends SPARCMemoryInstruction
  implements LoadInstruction
{
  protected final SPARCRegister register2;
  protected final Register[] loadDestinations;
  
  public SPARCLoadInstruction(String name, int opcode, SPARCRegisterIndirectAddress address, SPARCRegister register, int dataType)
  {
    super(name, opcode, address, register, dataType);
    if ((opcode == 3) || (opcode == 19))
    {
      int nextRegNum = (register.getNumber() + 1) % 32;
      register2 = SPARCRegisters.getRegister(nextRegNum);
      loadDestinations = new Register[2];
      loadDestinations[0] = register;
      loadDestinations[1] = register2;
    }
    else
    {
      register2 = null;
      loadDestinations = new Register[1];
      loadDestinations[0] = register;
    }
  }
  
  protected String getDescription()
  {
    StringBuffer buf = new StringBuffer();
    buf.append(getName());
    buf.append(spaces);
    buf.append(address.toString());
    buf.append(comma);
    buf.append(register.toString());
    return buf.toString();
  }
  
  public Register[] getLoadDestinations()
  {
    return loadDestinations;
  }
  
  public Address getLoadSource()
  {
    return address;
  }
  
  public boolean isLoad()
  {
    return true;
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.sparc.SPARCLoadInstruction
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.asm.sparc;

import sun.jvm.hotspot.asm.ImmediateOrRegister;
import sun.jvm.hotspot.asm.LogicInstruction;
import sun.jvm.hotspot.asm.Operand;

public class SPARCLogicInstruction
  extends SPARCFormat3AInstruction
  implements LogicInstruction
{
  private final int operation;
  
  public SPARCLogicInstruction(String name, int opcode, int operation, SPARCRegister rs1, ImmediateOrRegister operand2, SPARCRegister rd)
  {
    super(name, opcode, rs1, operand2, rd);
    this.operation = operation;
  }
  
  protected String getDescription()
  {
    SPARCRegister G0 = SPARCRegisters.G0;
    if ((opcode == 18) && (rd == G0) && (rd == operand2))
    {
      StringBuffer buf = new StringBuffer();
      buf.append("tst");
      buf.append(spaces);
      buf.append(getOperand2String());
      return buf.toString();
    }
    if ((opcode == 7) && (G0 == operand2))
    {
      StringBuffer buf = new StringBuffer();
      buf.append("not");
      buf.append(spaces);
      buf.append(rs1.toString());
      if (rs1 != rd)
      {
        buf.append(comma);
        buf.append(rd.toString());
      }
      return buf.toString();
    }
    if ((opcode == 17) && (rd == G0))
    {
      StringBuffer buf = new StringBuffer();
      buf.append("btst");
      buf.append(spaces);
      buf.append(getOperand2String());
      buf.append(comma);
      buf.append(rd.toString());
      return buf.toString();
    }
    if (rs1 == rd)
    {
      StringBuffer buf = new StringBuffer();
      switch (opcode)
      {
      case 2: 
        buf.append("bset");
        break;
      case 5: 
        buf.append("bclr");
        break;
      case 3: 
        buf.append("btog");
        break;
      case 4: 
      default: 
        return super.getDescription();
      }
      buf.append(spaces);
      buf.append(getOperand2String());
      buf.append(comma);
      buf.append(rd.toString());
      return buf.toString();
    }
    return super.getDescription();
  }
  
  public Operand getLogicDestination()
  {
    return getDestinationRegister();
  }
  
  public Operand[] getLogicSources()
  {
    return new Operand[] { rs1, operand2 };
  }
  
  public int getOperation()
  {
    return operation;
  }
  
  public boolean isLogic()
  {
    return true;
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.sparc.SPARCLogicInstruction
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.asm.sparc;

import sun.jvm.hotspot.asm.MemoryInstruction;
import sun.jvm.hotspot.asm.SymbolFinder;

public abstract class SPARCMemoryInstruction
  extends SPARCInstruction
  implements MemoryInstruction
{
  protected final SPARCRegisterIndirectAddress address;
  protected final SPARCRegister register;
  protected final int dataType;
  protected final int opcode;
  
  public SPARCMemoryInstruction(String name, int opcode, SPARCRegisterIndirectAddress address, SPARCRegister register, int dataType)
  {
    super(name);
    this.address = address;
    this.register = register;
    this.dataType = dataType;
    this.opcode = opcode;
  }
  
  protected String getDescription()
  {
    StringBuffer buf = new StringBuffer();
    buf.append(getName());
    buf.append(spaces);
    buf.append(address.toString());
    buf.append(comma);
    buf.append(register.toString());
    return buf.toString();
  }
  
  public String asString(long currentPc, SymbolFinder symFinder)
  {
    return getDescription();
  }
  
  public int getDataType()
  {
    return dataType;
  }
  
  public boolean isConditional()
  {
    return false;
  }
  
  public int getOpcode()
  {
    return opcode;
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.sparc.SPARCMemoryInstruction
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.asm.sparc;

import sun.jvm.hotspot.asm.ImmediateOrRegister;
import sun.jvm.hotspot.asm.MoveInstruction;
import sun.jvm.hotspot.asm.RTLOperations;
import sun.jvm.hotspot.asm.Register;

public class SPARCMoveInstruction
  extends SPARCFormat3AInstruction
  implements MoveInstruction, RTLOperations
{
  public SPARCMoveInstruction(String name, int opcode, ImmediateOrRegister operand2, SPARCRegister rd)
  {
    super(name, opcode, null, operand2, rd);
  }
  
  protected String getDescription()
  {
    StringBuffer buf = new StringBuffer();
    if (operand2 == SPARCRegisters.G0)
    {
      buf.append("clr");
      buf.append(spaces);
      buf.append(rd.toString());
    }
    else
    {
      buf.append("mov");
      buf.append(spaces);
      buf.append(getOperand2String());
      buf.append(comma);
      buf.append(rd.toString());
    }
    return buf.toString();
  }
  
  public Register getMoveDestination()
  {
    return getDestinationRegister();
  }
  
  public ImmediateOrRegister getMoveSource()
  {
    return operand2;
  }
  
  public boolean isConditional()
  {
    return false;
  }
  
  public boolean isMove()
  {
    return true;
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.sparc.SPARCMoveInstruction
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.asm.sparc;

public class SPARCNoopInstruction
  extends SPARCInstruction
{
  public SPARCNoopInstruction()
  {
    super("nop");
  }
  
  public boolean isNoop()
  {
    return true;
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.sparc.SPARCNoopInstruction
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.asm.sparc;

public abstract interface SPARCOpcodes
{
  public static final int FORMAT_START_BIT = 30;
  public static final int FORMAT_MASK = -1073741824;
  public static final int FORMAT_1 = 1;
  public static final int FORMAT_2 = 0;
  public static final int FORMAT_3 = 3;
  public static final int FORMAT_3A = 2;
  public static final int DISP_30_MASK = 1073741823;
  public static final int OP_2_START_BIT = 22;
  public static final int OP_2_MASK = 29360128;
  public static final int OP_2_UNIMP = 0;
  public static final int OP_2_Bicc = 2;
  public static final int OP_2_SETHI = 4;
  public static final int OP_2_FBfcc = 6;
  public static final int OP_2_CBccc = 7;
  public static final int CONDITION_CODE_START_BIT = 25;
  public static final int CONDITION_CODE_MASK = 503316480;
  public static final int CONDITION_BN = 0;
  public static final int CONDITION_FBN = 0;
  public static final int CONDITION_CBN = 0;
  public static final int CONDITION_TN = 0;
  public static final int CONDITION_BE = 1;
  public static final int CONDITION_FBNE = 1;
  public static final int CONDITION_CB123 = 1;
  public static final int CONDITION_TE = 1;
  public static final int CONDITION_BLE = 2;
  public static final int CONDITION_FBLG = 2;
  public static final int CONDITION_CB12 = 2;
  public static final int CONDITION_TLE = 2;
  public static final int CONDITION_BL = 3;
  public static final int CONDITION_FBUL = 3;
  public static final int CONDITION_CB13 = 3;
  public static final int CONDITION_TL = 3;
  public static final int CONDITION_BLEU = 4;
  public static final int CONDITION_FBL = 4;
  public static final int CONDITION_CB1 = 4;
  public static final int CONDITION_TLEU = 4;
  public static final int CONDITION_BCS = 5;
  public static final int CONDITION_FBUG = 5;
  public static final int CONDITION_CB23 = 5;
  public static final int CONDITION_TCS = 5;
  public static final int CONDITION_BNEG = 6;
  public static final int CONDITION_FBG = 6;
  public static final int CONDITION_CB2 = 6;
  public static final int CONDITION_TNEG = 6;
  public static final int CONDITION_BVS = 7;
  public static final int CONDITION_FBU = 7;
  public static final int CONDITION_CB3 = 7;
  public static final int CONDITION_TVS = 7;
  public static final int CONDITION_BA = 8;
  public static final int CONDITION_FBA = 8;
  public static final int CONDITION_CBA = 8;
  public static final int CONDITION_TA = 8;
  public static final int CONDITION_BNE = 9;
  public static final int CONDITION_FBE = 9;
  public static final int CONDITION_CB0 = 9;
  public static final int CONDITION_TNE = 9;
  public static final int CONDITION_BG = 10;
  public static final int CONDITION_FBUE = 10;
  public static final int CONDITION_CB03 = 10;
  public static final int CONDITION_TG = 10;
  public static final int CONDITION_BGE = 11;
  public static final int CONDITION_FBGE = 11;
  public static final int CONDITION_CB02 = 11;
  public static final int CONDITION_TGE = 11;
  public static final int CONDITION_BGU = 12;
  public static final int CONDITION_FBUGE = 12;
  public static final int CONDITION_CB023 = 12;
  public static final int CONDITION_TGU = 12;
  public static final int CONDITION_BCC = 13;
  public static final int CONDITION_FBLE = 13;
  public static final int CONDITION_CB01 = 13;
  public static final int CONDITION_TCC = 13;
  public static final int CONDITION_BPOS = 14;
  public static final int CONDITION_FBULE = 14;
  public static final int CONDITION_CB013 = 14;
  public static final int CONDITION_TPOS = 14;
  public static final int CONDITION_BVC = 15;
  public static final int CONDITION_FBO = 15;
  public static final int CONDITION_CB012 = 15;
  public static final int CONDITION_TVC = 15;
  public static final int ANNUL_MASK = 536870912;
  public static final int DISP_22_MASK = 4194303;
  public static final int IMM_22_MASK = 4194303;
  public static final int I_START_BIT = 13;
  public static final int I_MASK = 8192;
  public static final int ASI_START_BIT = 5;
  public static final int ASI_MASK = 8160;
  public static final int SIMM_13_MASK = 8191;
  public static final int OPF_START_BIT = 5;
  public static final int OPF_MASK = 16352;
  public static final int OPC_MASK = 16352;
  public static final int OP_3_START_BIT = 19;
  public static final int OP_3_MASK = 33030144;
  public static final int RD_START_BIT = 25;
  public static final int RD_MASK = 1040187392;
  public static final int RS1_START_BIT = 14;
  public static final int RS1_MASK = 507904;
  public static final int RS2_MASK = 31;
  public static final int LD = 0;
  public static final int LDA = 16;
  public static final int LDF = 32;
  public static final int LDC = 48;
  public static final int LDUB = 1;
  public static final int LDUBA = 17;
  public static final int LDFSR = 33;
  public static final int LDCSR = 49;
  public static final int LDUH = 2;
  public static final int LDUHA = 18;
  public static final int LDD = 3;
  public static final int LDDA = 19;
  public static final int LDDF = 35;
  public static final int LDDC = 51;
  public static final int ST = 4;
  public static final int STA = 20;
  public static final int STF = 36;
  public static final int STC = 52;
  public static final int STB = 5;
  public static final int STBA = 21;
  public static final int STFSR = 37;
  public static final int STCSR = 53;
  public static final int STH = 6;
  public static final int STHA = 22;
  public static final int STDFQ = 38;
  public static final int STDCQ = 54;
  public static final int STD = 7;
  public static final int STDA = 23;
  public static final int STDF = 39;
  public static final int STDC = 55;
  public static final int LDSB = 9;
  public static final int LDSBA = 25;
  public static final int LDSH = 10;
  public static final int LDSHA = 26;
  public static final int LDSTUB = 13;
  public static final int LDSTUBA = 29;
  public static final int SWAP = 15;
  public static final int SWAPA = 31;
  public static final int ADD = 0;
  public static final int ADDcc = 16;
  public static final int TADDcc = 32;
  public static final int WRASR = 48;
  public static final int WRY = 48;
  public static final in
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2019. Infinite Loop Ltd