s2 = Move.create(INT_MOVE, temp, I(ir.compiledMethodId));
s2 = Move.create(INT_MOVE, temp, I(ir.compiledMethod.getId()));
  public static void expandSysCall(OPT_Instruction s, OPT_IR ir) {    OPT_RegisterOperand ip, toc = null;    if (CallSpecial.getMethod(s) instanceof OPT_SysMethodOperand) {      OPT_SysMethodOperand nat = (OPT_SysMethodOperand)CallSpecial.getClearMethod(s);      OPT_RegisterOperand t1 = 	OPT_ConvertToLowLevelIR.getStatic(s, ir, VM_Entrypoints.the_boot_recordField);      ip = OPT_ConvertToLowLevelIR.getField(s, ir, t1, nat.ip);      toc = OPT_ConvertToLowLevelIR.getField(s, ir, t1.copyRO(), VM_Entrypoints.sysTOCField);    } else {      ip = (OPT_RegisterOperand)CallSpecial.getClearAddress(s);      toc = (OPT_RegisterOperand)CallSpecial.getClearMethod(s);    }    /* compute the parameter space */    int numberParams = CallSpecial.getNumberOfParams(s);    int parameterWords = 0;    for (int i = 0; i < numberParams; i++) {      parameterWords++;      OPT_Operand op = CallSpecial.getParam(s, i);      if (op instanceof OPT_RegisterOperand) {        OPT_RegisterOperand reg = (OPT_RegisterOperand)op;        if ((reg.type == VM_Type.LongType) || (reg.type == VM_Type.DoubleType))          parameterWords++;      } else if ((op instanceof OPT_LongConstantOperand) ||                  (op instanceof OPT_DoubleConstantOperand))        parameterWords++;    }    // see PowerPC Compiler Writer's Guide, pp. 162    ir.stackManager.allocateParameterSpace((6 + parameterWords)*4);    // IMPORTANT WARNING: as the callee C routine may destroy the cmid field    // (it is the saved CR field of the callee in C convention)     // we are restoring the methodID after a sysCall.     OPT_Instruction s2;    if (toc != null) {      s2 = Store.create(INT_STORE, ir.regpool.makeJTOCOp(ir,s),                         ir.regpool.makeFPOp(),                         I(20), null);         // TODO: valid location?      s.insertBack(s2);      s.insertBack(Move.create(INT_MOVE, ir.regpool.makeJTOCOp(ir,s), toc));    }    Call.mutate0(s, CALL, CallSpecial.getClearResult(s), ip, null);    if (toc != null) {      s2 = Load.create(INT_LOAD, ir.regpool.makeJTOCOp(ir,s), ir.regpool.makeFPOp(),                       I(20), null);         // TODO: valid location?      s.insertFront(s2);      OPT_RegisterOperand temp = ir.regpool.makeTempInt();      s2 = Move.create(INT_MOVE, temp, I(ir.compiledMethodId));      OPT_Instruction s3 = Store.create(INT_STORE, temp.copy(),                                         ir.regpool.makeFPOp(),                                         I(STACKFRAME_METHOD_ID_OFFSET), null);  // TODO: valid location?      s.insertFront(s3);      s.insertFront(s2);    }  }