Esempio n. 1
0
 Instruction decodeReadWrite(
     int instruction, SPARCInstructionFactory factory, int rs1Num, int rdNum) {
   Instruction instr = null;
   int specialReg = specialRegNum;
   if (rs1Num == 0) specialReg = SPARCSpecialRegisters.Y;
   if (rs1Num == 15 && rdNum == 0) {
     instr = factory.newStbarInstruction();
   } else {
     instr = factory.newReadInstruction(specialReg, rs1Num, SPARCRegisters.getRegister(rdNum));
   }
   return instr;
 }
Esempio n. 2
0
 Instruction decodeMemoryInstruction(
     int instruction,
     SPARCRegisterIndirectAddress addr,
     SPARCRegister rd,
     SPARCInstructionFactory factory) {
   return factory.newRettInstruction(addr);
 }
  Instruction decodeFloatInstruction(
      int instruction,
      SPARCRegister rs1,
      SPARCRegister rs2,
      SPARCRegister rd,
      SPARCInstructionFactory factory) {
    if (Assert.ASSERTS_ENABLED)
      Assert.that(rs2.isFloat() && rd.isFloat(), "rs2, rd have to be float registers");

    return factory.newFP2RegisterInstruction(
        name, opf, (SPARCFloatRegister) rs2, (SPARCFloatRegister) rd);
  }
 Instruction decode(int instruction, SPARCInstructionFactory factory) {
   return factory.newUnimpInstruction(instruction & DISP_22_MASK);
 }