sa-jdi

t AND = 1;
  public static final int ANDcc = 17;
  public static final int TSUBcc = 33;
  public static final int WRPSR = 49;
  public static final int OR = 2;
  public static final int ORcc = 18;
  public static final int TADDccTV = 34;
  public static final int WRWIM = 50;
  public static final int XOR = 3;
  public static final int XORcc = 19;
  public static final int TSUBccTV = 35;
  public static final int WRTBR = 51;
  public static final int SUB = 4;
  public static final int SUBcc = 20;
  public static final int MULScc = 36;
  public static final int FPop1 = 52;
  public static final int ANDN = 5;
  public static final int ANDNcc = 21;
  public static final int SLL = 37;
  public static final int FPop2 = 53;
  public static final int ORN = 6;
  public static final int ORNcc = 22;
  public static final int SRL = 38;
  public static final int CPop1 = 54;
  public static final int XNOR = 7;
  public static final int XNORcc = 23;
  public static final int SRA = 39;
  public static final int CPop2 = 55;
  public static final int ADDX = 8;
  public static final int ADDXcc = 24;
  public static final int RDASR = 40;
  public static final int RDY = 40;
  public static final int STBAR = 40;
  public static final int JMPL = 56;
  public static final int RDPSR = 41;
  public static final int RETT = 57;
  public static final int UMUL = 10;
  public static final int UMULcc = 26;
  public static final int RDWIM = 42;
  public static final int Ticc = 58;
  public static final int SMUL = 11;
  public static final int SMULcc = 27;
  public static final int RDTBR = 43;
  public static final int FLUSH = 59;
  public static final int SUBX = 12;
  public static final int SUBXcc = 28;
  public static final int SAVE = 60;
  public static final int RESTORE = 61;
  public static final int UDIV = 14;
  public static final int UDIVcc = 30;
  public static final int SDIV = 15;
  public static final int SDIVcc = 31;
  public static final int FMOVs = 1;
  public static final int FNEGs = 5;
  public static final int FABSs = 9;
  public static final int FSQRTs = 41;
  public static final int FSQRTd = 42;
  public static final int FSQRTq = 43;
  public static final int FADDs = 65;
  public static final int FADDd = 66;
  public static final int FADDq = 67;
  public static final int FSUBs = 69;
  public static final int FSUBd = 70;
  public static final int FSUBq = 71;
  public static final int FMULs = 73;
  public static final int FMULd = 74;
  public static final int FMULq = 75;
  public static final int FDIVs = 77;
  public static final int FDIVd = 78;
  public static final int FDIVq = 79;
  public static final int FsMULd = 105;
  public static final int FdMULq = 110;
  public static final int FiTOs = 196;
  public static final int FdTOs = 198;
  public static final int FqTOs = 199;
  public static final int FiTOd = 200;
  public static final int FsTOd = 201;
  public static final int FqTOd = 203;
  public static final int FiTOq = 204;
  public static final int FsTOq = 205;
  public static final int FdTOq = 206;
  public static final int FsTOi = 209;
  public static final int FdTOi = 210;
  public static final int FqTOi = 211;
  public static final int FCMPs = 81;
  public static final int FCMPd = 82;
  public static final int FCMPq = 83;
  public static final int FCMPEs = 85;
  public static final int FCMPEd = 86;
  public static final int FCMPEq = 87;
  public static final int SHIFT_COUNT_5_MASK = 31;
}

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

import sun.jvm.hotspot.utilities.Assert;

public class SPARCReadInstruction
  extends SPARCSpecialRegisterInstruction
{
  private final int specialReg;
  private final int asrRegNum;
  private final SPARCRegister rd;
  
  public SPARCReadInstruction(int specialReg, int asrRegNum, SPARCRegister rd)
  {
    super("rd");
    this.specialReg = specialReg;
    this.asrRegNum = asrRegNum;
    this.rd = rd;
  }
  
  public int getSpecialRegister()
  {
    return specialReg;
  }
  
  public int getAncillaryRegister()
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that(specialReg == 4, "not an ancillary register");
    }
    return asrRegNum;
  }
  
  protected String getDescription()
  {
    StringBuffer buf = new StringBuffer();
    buf.append(getName());
    buf.append(spaces);
    if (specialReg == 4) {
      buf.append("%asr" + asrRegNum);
    } else {
      buf.append(getSpecialRegisterName(specialReg));
    }
    buf.append(comma);
    buf.append(rd.toString());
    return buf.toString();
  }
}

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

import sun.jvm.hotspot.asm.Register;
import sun.jvm.hotspot.runtime.VM;
import sun.jvm.hotspot.utilities.Assert;

public class SPARCRegister
  extends Register
{
  private static final int nofRegisters = 32;
  private static final int GLOBAL_BASE = 0;
  private static final int OUT_BASE = 8;
  private static final int LOCAL_BASE = 16;
  private static final int IN_BASE = 24;
  private static final int LOCAL_SP_WORD_OFFSET = 0;
  private static final int IN_SP_WORD_OFFSET = 8;
  
  public SPARCRegister(int number)
  {
    super(number);
  }
  
  public SPARCRegister(SPARCRegisterType type, int number)
  {
    if (type == SPARCRegisterType.GLOBAL) {
      this.number = (number + 0);
    } else if (type == SPARCRegisterType.OUT) {
      this.number = (number + 8);
    } else if (type == SPARCRegisterType.LOCAL) {
      this.number = (number + 16);
    } else if (type == SPARCRegisterType.IN) {
      this.number = (number + 24);
    } else {
      throw new IllegalArgumentException("Invalid SPARC register type");
    }
  }
  
  public int getNumberOfRegisters()
  {
    return 32;
  }
  
  public boolean isIn()
  {
    return 24 <= getNumber();
  }
  
  public boolean isLocal()
  {
    return (16 <= getNumber()) && (getNumber() < 24);
  }
  
  public boolean isOut()
  {
    return (8 <= getNumber()) && (getNumber() < 16);
  }
  
  public boolean isGlobal()
  {
    return (0 <= getNumber()) && (getNumber() < 8);
  }
  
  public SPARCRegister afterSave()
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that((isOut()) || (isGlobal()), "register not visible after save");
    }
    return isOut() ? new SPARCRegister(getNumber() + 16) : this;
  }
  
  public SPARCRegister afterRestore()
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that((isIn()) || (isGlobal()), "register not visible after save");
    }
    return isIn() ? new SPARCRegister(getNumber() + -16) : this;
  }
  
  public long spOffsetInSavedWindow()
  {
    if (isIn()) {
      return VM.getVM().getAddressSize() * (getNumber() - 24 + 8);
    }
    if (isLocal()) {
      return VM.getVM().getAddressSize() * (getNumber() - 16 + 0);
    }
    if (Assert.ASSERTS_ENABLED) {
      Assert.that((isIn()) || (isLocal()), "only ins and locals are saved in my frame");
    }
    return 0L;
  }
  
  public String toString()
  {
    return SPARCRegisters.getRegisterName(number);
  }
  
  public boolean isFramePointer()
  {
    return number == 30;
  }
  
  public boolean isStackPointer()
  {
    return number == 14;
  }
  
  public boolean isFloat()
  {
    return false;
  }
  
  public boolean isV9Only()
  {
    return false;
  }
}

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

import sun.jvm.hotspot.asm.BaseIndexScaleDispAddress;
import sun.jvm.hotspot.asm.Register;

public class SPARCRegisterIndirectAddress
  extends BaseIndexScaleDispAddress
{
  protected int addressSpace = -1;
  
  public SPARCRegisterIndirectAddress(SPARCRegister register, int offset)
  {
    super(register, offset);
  }
  
  public SPARCRegisterIndirectAddress(SPARCRegister base, SPARCRegister index)
  {
    super(base, index);
  }
  
  public int getAddressSpace()
  {
    return addressSpace;
  }
  
  public void setAddressSpace(int addressSpace)
  {
    this.addressSpace = addressSpace;
  }
  
  public String getAddressWithoutAsi()
  {
    StringBuffer buf = new StringBuffer();
    buf.append('[');
    buf.append(getBase().toString());
    Register register = getIndex();
    if (register != null)
    {
      buf.append(" + ");
      buf.append(register.toString());
    }
    else
    {
      long disp = getDisplacement();
      if (disp < 0L)
      {
        buf.append(" - 0x");
        disp = -disp;
      }
      else
      {
        buf.append(" + 0x");
      }
      buf.append(Long.toHexString(disp));
    }
    buf.append(']');
    return buf.toString();
  }
  
  public String toString()
  {
    StringBuffer buf = new StringBuffer();
    buf.append(getAddressWithoutAsi());
    if (addressSpace != -1) {
      buf.append(new Integer(addressSpace).toString());
    }
    return buf.toString();
  }
}

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

import sun.jvm.hotspot.utilities.Assert;

public class SPARCRegisters
{
  public static final SPARCRegister G0 = new SPARCRegister(0);
  public static final SPARCRegister G1 = new SPARCRegister(1);
  public static final SPARCRegister G2 = new SPARCRegister(2);
  public static final SPARCRegister G3 = new SPARCRegister(3);
  public static final SPARCRegister G4 = new SPARCRegister(4);
  public static final SPARCRegister G5 = new SPARCRegister(5);
  public static final SPARCRegister G6 = new SPARCRegister(6);
  public static final SPARCRegister G7 = new SPARCRegister(7);
  public static final SPARCRegister O0 = new SPARCRegister(8);
  public static final SPARCRegister O1 = new SPARCRegister(9);
  public static final SPARCRegister O2 = new SPARCRegister(10);
  public static final SPARCRegister O3 = new SPARCRegister(11);
  public static final SPARCRegister O4 = new SPARCRegister(12);
  public static final SPARCRegister O5 = new SPARCRegister(13);
  public static final SPARCRegister O6 = new SPARCRegister(14);
  public static final SPARCRegister O7 = new SPARCRegister(15);
  public static final SPARCRegister L0 = new SPARCRegister(16);
  public static final SPARCRegister L1 = new SPARCRegister(17);
  public static final SPARCRegister L2 = new SPARCRegister(18);
  public static final SPARCRegister L3 = new SPARCRegister(19);
  public static final SPARCRegister L4 = new SPARCRegister(20);
  public static final SPARCRegister L5 = new SPARCRegister(21);
  public static final SPARCRegister L6 = new SPARCRegister(22);
  public static final SPARCRegister L7 = new SPARCRegister(23);
  public static final SPARCRegister I0 = new SPARCRegister(24);
  public static final SPARCRegister I1 = new SPARCRegister(25);
  public static final SPARCRegister I2 = new SPARCRegister(26);
  public static final SPARCRegister I3 = new SPARCRegister(27);
  public static final SPARCRegister I4 = new SPARCRegister(28);
  public static final SPARCRegister I5 = new SPARCRegister(29);
  public static final SPARCRegister I6 = new SPARCRegister(30);
  public static final SPARCRegister I7 = new SPARCRegister(31);
  private static String[] registerNames = new String[32];
  public static final int NUM_REGISTERS = 32;
  
  static
  {
    registerNames[G0.getNumber()] = "%g0";
    registerNames[G1.getNumber()] = "%g1";
    registerNames[G2.getNumber()] = "%g2";
    registerNames[G3.getNumber()] = "%g3";
    registerNames[G4.getNumber()] = "%g4";
    registerNames[G5.getNumber()] = "%g5";
    registerNames[G6.getNumber()] = "%g6";
    registerNames[G7.getNumber()] = "%g7";
    registerNames[O0.getNumber()] = "%o0";
    registerNames[O1.getNumber()] = "%o1";
    registerNames[O2.getNumber()] = "%o2";
    registerNames[O3.getNumber()] = "%o3";
    registerNames[O4.getNumber()] = "%o4";
    registerNames[O5.getNumber()] = "%o5";
    registerNames[O6.getNumber()] = "%sp";
    registerNames[O7.getNumber()] = "%o7";
    registerNames[I0.getNumber()] = "%i0";
    registerNames[I1.getNumber()] = "%i1";
    registerNames[I2.getNumber()] = "%i2";
    registerNames[I3.getNumber()] = "%i3";
    registerNames[I4.getNumber()] = "%i4";
    registerNames[I5.getNumber()] = "%i5";
    registerNames[I6.getNumber()] = "%fp";
    registerNames[I7.getNumber()] = "%i7";
    registerNames[L0.getNumber()] = "%l0";
    registerNames[L1.getNumber()] = "%l1";
    registerNames[L2.getNumber()] = "%l2";
    registerNames[L3.getNumber()] = "%l3";
    registerNames[L4.getNumber()] = "%l4";
    registerNames[L5.getNumber()] = "%l5";
    registerNames[L6.getNumber()] = "%l6";
    registerNames[L7.getNumber()] = "%l7";
  }
  
  private static SPARCRegister[] registers = { G0, G1, G2, G3, G4, G5, G6, G7, O0, O1, O2, O3, O4, O5, O6, O7, L0, L1, L2, L3, L4, L5, L6, L7, I0, I1, I2, I3, I4, I5, I6, I7 };
  public static final SPARCRegister FP = I6;
  public static final SPARCRegister SP = O6;
  public static final SPARCRegister Lesp = L0;
  public static final SPARCRegister Lbcp = L1;
  public static final SPARCRegister Lmethod = L2;
  public static final SPARCRegister Llocals = L3;
  public static final SPARCRegister Lmonitors = L4;
  public static final SPARCRegister Lbyte_code = L5;
  public static final SPARCRegister Lscratch = L5;
  public static final SPARCRegister Lscratch2 = L6;
  public static final SPARCRegister LcpoolCache = L6;
  public static final SPARCRegister OparamAddr = O0;
  public static final SPARCRegister IsavedSP = I5;
  public static final SPARCRegister IsizeCalleeParms = I4;
  public static final SPARCRegister IdispatchAddress = I3;
  public static final SPARCRegister IdispatchTables = I2;
  
  public static int getNumRegisters()
  {
    return 32;
  }
  
  public static String getRegisterName(int regNum)
  {
    if ((regNum < 0) || (regNum >= 32)) {
      return "[Illegal register " + regNum + "]";
    }
    if (Assert.ASSERTS_ENABLED) {
      Assert.that((regNum > -1) && (regNum < 32), "invalid integer register number!");
    }
    return registerNames[regNum];
  }
  
  public static SPARCRegister getRegister(int regNum)
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that((regNum > -1) && (regNum < 32), "invalid integer register number!");
    }
    return registers[regNum];
  }
}

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

public class SPARCRegisterType
{
  public static final SPARCRegisterType GLOBAL = new SPARCRegisterType();
  public static final SPARCRegisterType OUT = new SPARCRegisterType();
  public static final SPARCRegisterType IN = new SPARCRegisterType();
  public static final SPARCRegisterType LOCAL = new SPARCRegisterType();
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.sparc.SPARCRegisterType
 * 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;

public class SPARCRestoreInstruction
  extends SPARCFormat3AInstruction
{
  private final boolean trivial;
  
  public SPARCRestoreInstruction(SPARCRegister rs1, ImmediateOrRegister operand2, SPARCRegister rd)
  {
    super("restore", 61, rs1, operand2, rd);
    SPARCRegister G0 = SPARCRegisters.G0;
    trivial = ((rs1 == G0) && (operand2 == G0) && (rd == G0));
  }
  
  public boolean isTrivial()
  {
    return trivial;
  }
  
  protected String getDescription()
  {
    return trivial ? getName() : super.getDescription();
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.sparc.SPARCRestoreInstruction
 * 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 SPARCRettInstruction
  extends SPARCInstruction
  implements BranchInstruction
{
  protected final SPARCRegisterIndirectAddress addr;
  protected final String description;
  
  protected SPARCRettInstruction(String name, SPARCRegisterIndirectAddress addr)
  {
    super(name);
    this.addr = addr;
    description = initDescription();
  }
  
  public SPARCRettInstruction(SPARCRegisterIndirectAddress addr)
  {
    this("rett", addr);
  }
  
  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;
  }
  
  public Address getBranchDestination()
  {
    return addr;
  }
  
  public boolean isAnnuledBranch()
  {
    return false;
  }
  
  public boolean isBranch()
  {
    return true;
  }
  
  public boolean isConditional()
  {
    return false;
  }
}

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

import sun.jvm.hotspot.asm.ReturnInstruction;

public class SPARCReturnInstruction
  extends SPARCJmplInstruction
  implements ReturnInstruction
{
  private final boolean leaf;
  
  public SPARCReturnInstruction(SPARCRegisterIndirectAddress addr, SPARCRegister rd, boolean leaf)
  {
    super(leaf ? "retl" : "ret", addr, rd);
    this.leaf = leaf;
  }
  
  public boolean isLeaf()
  {
    return leaf;
  }
  
  protected String getDescription()
  {
    return getName();
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.sparc.SPARCReturnInstruction
 * 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;

public class SPARCSaveInstruction
  extends SPARCFormat3AInstruction
{
  private final boolean trivial;
  
  public SPARCSaveInstruction(SPARCRegister rs1, ImmediateOrRegister operand2, SPARCRegister rd)
  {
    super("save", 60, rs1, operand2, rd);
    SPARCRegister G0 = SPARCRegisters.G0;
    trivial = ((rs1 == G0) && (operand2 == G0) && (rd == G0));
  }
  
  public boolean isTrivial()
  {
    return trivial;
  }
  
  protected String getOperand2String()
  {
    StringBuffer buf = new StringBuffer();
    if (operand2.isRegister())
    {
      buf.append(operand2.toString());
    }
    else
    {
      Number number = ((Immediate)operand2).getNumber();
      int value = number.intValue();
      if (value < 0)
      {
        buf.append("-0x");
        value = -value;
      }
      else
      {
        buf.append("0x");
      }
      buf.append(Integer.toHexString(value));
    }
    return buf.toString();
  }
  
  protected String getDescription()
  {
    return trivial ? getName() : super.getDescription();
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.sparc.SPARCSaveInstruction
 * 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.MoveInstruction;
import sun.jvm.hotspot.asm.Register;
import sun.jvm.hotspot.asm.SymbolFinder;

public class SPARCSethiInstruction
  extends SPARCInstruction
  implements MoveInstruction
{
  private final SPARCRegister register;
  private final ImmediateOrRegister value;
  private final String description;
  
  public SPARCSethiInstruction(int value, SPARCRegister register)
  {
    super("sethi");
    this.register = register;
    value <<= 10;
    this.value = new Immediate(new Integer(value));
    description = initDescription(value);
  }
  
  private String initDescription(int val)
  {
    if ((val == 0) && (register == SPARCRegisters.G0)) {
      return "nop";
    }
    StringBuffer buf = new StringBuffer();
    buf.append(getName());
    buf.append(spaces);
    buf.append("%hi(0x");
    buf.append(Integer.toHexString(val));
    buf.append(')');
    buf.append(comma);
    buf.append(register.toString());
    return buf.toString();
  }
  
  public String asString(long currentPc, SymbolFinder symFinder)
  {
    return description;
  }
  
  public Register getMoveDestination()
  {
    return register;
  }
  
  public ImmediateOrRegister getMoveSource()
  {
    return value;
  }
  
  public boolean isConditional()
  {
    return false;
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.sparc.SPARCSethiInstruction
 * 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.Operand;
import sun.jvm.hotspot.asm.ShiftInstruction;

public class SPARCShiftInstruction
  extends SPARCFormat3AInstruction
  implements ShiftInstruction
{
  private final int operation;
  
  public SPARCShiftInstruction(String name, int opcode, int operation, SPARCRegister rs1, ImmediateOrRegister operand2, SPARCRegister rd)
  {
    super(name, opcode, rs1, operand2, rd);
    this.operation = operation;
  }
  
  public int getOperation()
  {
    return operation;
  }
  
  public Operand getShiftDestination()
  {
    return getDestinationRegister();
  }
  
  public Operand getShiftLength()
  {
    return operand2;
  }
  
  public Operand getShiftSource()
  {
    return rs1;
  }
  
  public boolean isShift()
  {
    return true;
  }
  
  protected String getOperand2String()
  {
    return operand2.toString();
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.sparc.SPARCShiftInstruction
 * 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.utilities.Assert;

public class SPARCSpecialLoadInstruction
  extends SPARCSpecialRegisterInstruction
  implements SPARCSpecialRegisters
{
  private final int specialReg;
  private final int cregNum;
  private final SPARCRegisterIndirectAddress addr;
  
  public SPARCSpecialLoadInstruction(String name, int specialReg, int cregNum, SPARCRegisterIndirectAddress addr)
  {
    super(name);
    this.specialReg = specialReg;
    this.cregNum = cregNum;
    this.addr = addr;
  }
  
  public SPARCSpecialLoadInstruction(String name, int specialReg, SPARCRegisterIndirectAddress addr)
  {
    this(name, specialReg, -1, addr);
  }
  
  public int getSpecialRegister()
  {
    return specialReg;
  }
  
  public int getCoprocessorRegister()
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that(specialReg == 9, "not a coprocesssor register");
    }
    return cregNum;
  }
  
  public Address getSource()
  {
    return addr;
  }
  
  protected String getDescription()
  {
    StringBuffer buf = new StringBuffer();
    buf.append(getName());
    buf.append(spaces);
    buf.append(addr);
    buf.append(comma);
    if (specialReg == 9) {
      buf.append("creg" + cregNum);
    } else {
      buf.append(getSpecialRegisterName(specialReg));
    }
    return buf.toString();
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.sparc.SPARCSpecialLoadInstruction
 * 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 abstract class SPARCSpecialRegisterInstruction
  extends SPARCInstruction
  implements SPARCSpecialRegisters
{
  protected SPARCSpecialRegisterInstruction(String name)
  {
    super(name);
  }
  
  protected abstract String getDescription();
  
  public String asString(long currentPc, SymbolFinder symFinder)
  {
    return getDescription();
  }
  
  protected static String[] specialRegNames = { "%y", "%psr", "%wim", "%tbr", "%asr", "%fsr", "%csr", "%fq", "%cq" };
  
  protected static String getSpecialRegisterName(int index)
  {
    return specialRegNames[index];
  }
}

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

public abstract interface SPARCSpecialRegisters
{
  public static final int Y = 0;
  public static final int PSR = 1;
  public static final int WIM = 2;
  public static final int TBR = 3;
  public static final int ASR = 4;
  public static final int FSR = 5;
  public static final int CSR = 6;
  public static final int FQ = 7;
  public static final int CQ = 8;
  public static final int CREG = 9;
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.sparc.SPARCSpecialRegisters
 * 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.utilities.Assert;

public class SPARCSpecialStoreInstruction
  extends SPARCSpecialRegisterInstruction
  implements SPARCSpecialRegisters
{
  private final int specialReg;
  private final int cregNum;
  private final SPARCRegisterIndirectAddress addr;
  
  public SPARCSpecialStoreInstruction(String name, int specialReg, int cregNum, SPARCRegisterIndirectAddress addr)
  {
    super(name);
    this.specialReg = specialReg;
    this.addr = addr;
    this.cregNum = cregNum;
  }
  
  public SPARCSpecialStoreInstruction(String name, int specialReg, SPARCRegisterIndirectAddress addr)
  {
    this(name, specialReg, -1, addr);
  }
  
  public int getSpecialRegister()
  {
    return specialReg;
  }
  
  public int getCoprocessorRegister()
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that(specialReg == 9, "not a special register");
    }
    return cregNum;
  }
  
  public Address getDestination()
  {
    return addr;
  }
  
  protected String getDescription()
  {
    StringBuffer buf = new StringBuffer(getName());
    buf.append(spaces);
    if (specialReg == 9) {
      buf.append("creg" + cregNum);
    } else {
      buf.append(getSpecialRegisterName(specialReg));
    }
    buf.append(comma);
    buf.append(addr.toString());
    return buf.toString();
  }
}

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

public class SPARCStbarInstruction
  extends SPARCInstruction
{
  public SPARCStbarInstruction()
  {
    super("stbar");
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.sparc.SPARCStbarInstruction
 * 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.Register;
import sun.jvm.hotspot.asm.StoreInstruction;

public class SPARCStoreInstruction
  extends SPARCMemoryInstruction
  implements StoreInstruction
{
  protected final SPARCRegister register2;
  protected final Register[] storeSources;
  
  public SPARCStoreInstruction(String name, int opcode, SPARCRegisterIndirectAddress address, SPARCRegister register, int dataType)
  {
    super(name, opcode, address, register, dataType);
    if ((opcode == 7) || (opcode == 23))
    {
      storeSources = new Register[2];
      storeSources[0] = register;
      int nextRegNum = (register.getNumber() + 1) % 32;
      register2 = SPARCRegisters.getRegister(nextRegNum);
      storeSources[1] = register2;
    }
    else
    {
      storeSources = new Register[1];
      storeSources[0] = register;
      register2 = null;
    }
  }
  
  private String defaultInitDescription(StringBuffer buf)
  {
    buf.append(getName());
    buf.append(spaces);
    buf.append(register.toString());
    buf.append(comma);
    buf.append(address.toString());
    return buf.toString();
  }
  
  protected String getDescription()
  {
    StringBuffer buf = new StringBuffer();
    if (register == SPARCRegisters.G0)
    {
      switch (opcode)
      {
      case 4: 
        buf.append("clr");
        break;
      case 6: 
        buf.append("clrh");
        break;
      case 5: 
        buf.append("clrb");
        break;
      default: 
        return defaultInitDescription(buf);
      }
      buf.append(spaces);
      buf.append(address.toString());
      return buf.toString();
    }
    return defaultInitDescription(buf);
  }
  
  public int getDataType()
  {
    return dataType;
  }
  
  public Address getStoreDestination()
  {
    return address;
  }
  
  public Register[] getStoreSources()
  {
    return storeSources;
  }
  
  public boolean isStore()
  {
    return true;
  }
}

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

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

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.sparc.SPARCSwapInstruction
 * 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;

public class SPARCTrapInstruction
  extends SPARCInstruction
  implements BranchInstruction
{
  protected final int conditionCode;
  
  public SPARCTrapInstruction(String name, int conditionCode)
  {
    super(name);
    this.conditionCode = conditionCode;
  }
  
  public Address getBranchDestination()
  {
    return null;
  }
  
  public int getConditionCode()
  {
    return conditionCode;
  }
  
  public boolean isConditional()
  {
    return (conditionCode != 0) && (conditionCode != 8);
  }
  
  public boolean isTrap()
  {
    return true;
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.sparc.SPARCTrapInstruction
 * 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 SPARCUnimpInstruction
  extends SPARCInstruction
{
  private final String description;
  private final int const22;
  
  protected SPARCUnimpInstruction(String name, int const22)
  {
    super(name);
    this.const22 = const22;
    description = initDescription();
  }
  
  public SPARCUnimpInstruction(int const22)
  {
    this("unimp", const22);
  }
  
  public int getConst22()
  {
    return const22;
  }
  
  public boolean isIllegal()
  {
    return true;
  }
  
  private String initDescription()
  {
    StringBuffer buf = new StringBuffer();
    buf.append(getName());
    buf.append(spaces);
    buf.append("0x");
    buf.append(Integer.toHexString(const22));
    return buf.toString();
  }
  
  public String asString(long currentPc, SymbolFinder symFinder)
  {
    return description;
  }
}

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

public class SPARCV8Disassembler
  extends SPARCDisassembler
{
  public SPARCV8Disassembler(long startPc, byte[] code, SPARCInstructionFactory factory)
  {
    super(startPc, code, factory);
  }
  
  public SPARCV8Disassembler(long startPc, byte[] code)
  {
    this(startPc, code, new SPARCInstructionFactoryImpl());
  }
  
  private static InstructionDecoder[] format2Decoders = { new UnimpDecoder(), illegalDecoder, new IntegerBranchDecoder(), illegalDecoder, new SethiDecoder(), illegalDecoder, new FloatBranchDecoder(), new CoprocessorBranchDecoder() };
  
  protected InstructionDecoder getFormat2Decoder(int op2)
  {
    return format2Decoders[op2];
  }
  
  private static final InstructionDecoder[][] format3Decoders = { { new LoadDecoder(0, "ld", 5), new AlternateSpaceLoadDecoder(16, "lda", 5), new LoadDecoder(32, "ld", 10), new SpecialLoadDecoder(48, "ld", 9) }, { new LoadDecoder(1, "ldub", 1), new AlternateSpaceLoadDecoder(17, "lduba", 1), new SpecialLoadDecoder(33, "ld", 5), new SpecialLoadDecoder(49, "ld", 6) }, { new LoadDecoder(2, "lduh", 3), new AlternateSpaceLoadDecoder(18, "lduha", 3), illegalDecoder, illegalDecoder }, { new LoadDecoder(3, "ldd", 7), new AlternateSpaceLoadDecoder(19, "ldda", 7), new LoadDecoder(35, "ldd", 11), new SpecialLoadDecoder(51, "ldd", 9) }, { new StoreDecoder(4, "st", 5), new AlternateSpaceStoreDecoder(20, "sta", 5), new StoreDecoder(36, "st", 10), new SpecialStoreDecoder(52, "st", 9) }, { new StoreDecoder(5, "stb", 1), new AlternateSpaceStoreDecoder(21, "stba", 1), new SpecialStoreDecoder(37, "st", 5), new SpecialStoreDecoder(53, "st", 6) }, { new StoreDecoder(6, "sth", 3), new AlternateSpaceStoreDecoder(22, "stha", 3), new SpecialStoreDecoder(38, "std", 7), new SpecialStoreDecoder(54, "std", 8) }, { new StoreDecoder(7, "std", 7), new AlternateSpaceStoreDecoder(23, "stda", 7), new StoreDecoder(39, "std", 11), new SpecialStoreDecoder(55, "std", 9) }, { illegalDecoder, illegalDecoder, illegalDecoder, illegalDecoder }, { new LoadDecoder(9, "ldsb", 0), new AlternateSpaceLoadDecoder(25, "ldsba", 1), illegalDecoder, illegalDecoder }, { new LoadDecoder(10, "ldsh", 2), new AlternateSpaceLoadDecoder(26, "ldsha", 3), illegalDecoder, illegalDecoder }, { illegalDecoder, illegalDecoder, illegalDecoder, illegalDecoder }, { illegalDecoder, illegalDecoder, illegalDecoder, illegalDecoder }, { new LdstubDecoder(13, "ldstub", 1), new AlternateSpaceLdstubDecoder(29, "ldstuba", 1), illegalDecoder, illegalDecoder }, { illegalDecoder, illegalDecoder, illegalDecoder, illegalDecoder }, { new SwapDecoder(15, "swap", 5), new AlternateSpaceSwapDecoder(31, "swapa", 5), illegalDecoder, illegalDecoder } };
  
  protected InstructionDecoder getFormat3Decoder(int row, int column)
  {
    return format3Decoders[row][column];
  }
  
  protected static final InstructionDecoder[][] format3ADecoders = { { new ArithmeticDecoder(0, "add", 0), new ArithmeticDecoder(16, "addcc", 0), new ArithmeticDecoder(32, "taddcc", 0), new WriteDecoder(4) }, { new LogicDecoder(1, "and", 8), new LogicDecoder(17, "andcc", 8), new ArithmeticDecoder(33, "tsubcc", 0), new WriteDecoder(1) }, { new LogicDecoder(2, "or", 9), new LogicDecoder(18, "orcc", 9), new ArithmeticDecoder(34, "taddcctv", 0), new WriteDecoder(2) }, { new LogicDecoder(3, "xor", 13), new LogicDecoder(19, "xorcc", 13), new ArithmeticDecoder(35, "tsubcctv", 2), new WriteDecoder(3) }, { new ArithmeticDecoder(4, "sub", 2), new ArithmeticDecoder(20, "subcc", 2), new ArithmeticDecoder(36, "mulscc", 4), new V8FPop1Decoder() }, { new LogicDecoder(5, "andn", 11), new LogicDecoder(21, "andncc", 11), new ShiftDecoder(37, "sll", 17), new V8FPop2Decoder() }, { new LogicDecoder(6, "orn", 12), new LogicDecoder(22, "orncc", 12), new ShiftDecoder(38, "srl", 15), new CoprocessorDecoder(54) }, { new LogicDecoder(7, "xnor", 14), new LogicDecoder(23, "xnorcc", 14), new ShiftDecoder(39, "sra", 16), new CoprocessorDecoder(55) }, { new ArithmeticDecoder(8, "addx", 1), new ArithmeticDecoder(24, "addxcc", 1), new ReadDecoder(4), new JmplDecoder() }, { illegalDecoder, illegalDecoder, new ReadDecoder(1), new RettDecoder() }, { new ArithmeticDecoder(10, "umul", 5), new ArithmeticDecoder(26, "umulcc", 5), new ReadDecoder(2), new TrapDecoder() }, { new ArithmeticDecoder(11, "smul", 4), new ArithmeticDecoder(27, "smulcc", 4), new ReadDecoder(3), new FlushDecoder() }, { new ArithmeticDecoder(12, "subx", 3), new ArithmeticDecoder(28, "subxcc", 3), illegalDecoder, new SaveDecoder() }, { illegalDecoder, illegalDecoder, illegalDecoder, new RestoreDecoder() }, { new ArithmeticDecoder(14, "udiv", 7), new ArithmeticDecoder(30, "udivcc", 7), illegalDecoder, illegalDecoder }, { new ArithmeticDecoder(15, "sdiv", 6), new ArithmeticDecoder(31, "sdivcc", 6), illegalDecoder, illegalDecoder } };
  
  protected InstructionDecoder getFormat3ADecoder(int row, int column)
  {
    return format3ADecoders[row][column];
  }
}

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

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

public class SPARCV9BranchInstruction
  extends SPARCBranchInstruction
  implements SPARCV9Instruction
{
  private final boolean predictTaken;
  private final int conditionFlag;
  
  public SPARCV9BranchInstruction(String name, PCRelativeAddress addr, boolean isAnnuled, int conditionCode, boolean predictTaken, int conditionFlag)
  {
    super(name += (predictTaken ? ",pt" : ",pn"), addr, isAnnuled, conditionCode);
    this.predictTaken = predictTaken;
    this.conditionFlag = conditionFlag;
  }
  
  public boolean getPredictTaken()
  {
    return predictTaken;
  }
  
  public String getConditionFlagName()
  {
    return SPARCV9ConditionFlags.getFlagName(conditionFlag);
  }
  
  public int getConditionFlag()
  {
    return conditionFlag;
  }
  
  public String asString(long currentPc, SymbolFinder symFinder)
  {
    long address = addr.getDisplacement() + currentPc;
    StringBuffer buf = new StringBuffer();
    buf.append(getName());
    buf.append(spaces);
    
    buf.append(getConditionFlagName());
    buf.append(comma);
    buf.append(symFinder.getSymbolFor(address));
    return buf.toString();
  }
}

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

public class SPARCV9CasInstruction
  extends SPARCAtomicLoadStoreInstruction
  implements SPARCV9Instruction
{
  private final SPARCRegister rs2;
  private final int dataType;
  
  public SPARCV9CasInstruction(String name, SPARCRegisterIndirectAddress addr, SPARCRegister rs2, SPARCRegister rd, int dataType)
  {
    super(name, addr, rd);
    this.rs2 = rs2;
    this.dataType = dataType;
  }
  
  public int getDataType()
  {
    return dataType;
  }
  
  public boolean isConditional()
  {
    return true;
  }
  
  public SPARCRegister getComparisonRegister()
  {
    return rs2;
  }
}

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

class SPARCV9ConditionFlags
{
  private static final String[] ccFlagNames = { "%fcc0", "%fcc1", "%fcc2", "%fcc3", "%icc", null, "%xcc", null };
  
  public static String getFlagName(int index)
  {
    return ccFlagNames[index];
  }
}

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

public class SPARCV9Disassembler
  extends SPARCDisassembler
  implements SPARCV9Opcodes
{
  public SPARCV9Disassembler(long startPc, byte[] code, SPARCV9InstructionFactory factory)
  {
    super(startPc, code, factory);
  }
  
  public SPARCV9Disassembler(long startPc, byte[] code)
  {
    this(startPc, code, new SPARCV9InstructionFactoryImpl());
  }
  
  private static InstructionDecoder[] format2Decoders = { new UnimpDecoder(), new V9IntegerBranchDecoder(), new IntegerBranchDecoder(), new V9IntRegisterBranchDecoder(), new SethiDecoder(), new V9FloatBranchDecoder(), new FloatBranchDecoder(), illegalDecoder };
  
  protected InstructionDecoder getFormat2Decoder(int op2)
  {
    return format2Decoders[op2];
  }
  
  private static final InstructionDecoder[][] format3Decoders = { { new LoadDecoder(0, "ld", 5), new V9AlternateSpaceLoadDecoder(16, "lduwa", 5), new LoadDecoder(32, "ld", 10), new V9AlternateSpaceLoadDecoder(48, "lda", 10) }, { new LoadDecoder(1, "ldub", 1), new V9AlternateSpaceLoadDecoder(17, "lduba", 1), new V9SpecialLoadDecoder(33), illegalDecoder }, { new LoadDecoder(2, "lduh", 3), 
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