s2 = Move.create(REF_MOVE, temp, I(ir.compiledMethod.getId()));    OPT_RegisterOperand temp = ir.regpool.makeTempLong(); s2 = Move.create(REF_MOVE, temp, LC(ir.compiledMethod.getId()));  OPT_Instruction s3 = Store.create(REF_STORE, temp.copy(),
s2 = Move.create(INT_MOVE, temp, I(ir.compiledMethod.getId())); OPT_Instruction s3 = Store.create(INT_STORE, temp.copy(),
  public static void expandSysCall(OPT_Instruction s, OPT_IR ir) {    OPT_RegisterOperand ip = null;    OPT_RegisterOperand t1 =       OPT_ConvertToLowLevelIR.getStatic(s, ir, VM_Entrypoints.the_boot_recordField);    OPT_RegisterOperand toc = OPT_ConvertToLowLevelIR.getField(s, ir, t1, VM_Entrypoints.sysTOCField);    if (Call.getMethod(s) != null) {      OPT_MethodOperand nat = Call.getClearMethod(s);      VM_Field target = null;      target = nat.getMemberRef().asFieldReference().resolve();      ip = OPT_ConvertToLowLevelIR.getField(s, ir, t1.copyRO(), target);    } else {      ip = (OPT_RegisterOperand)Call.getClearAddress(s);    }    /* compute the parameter space */    int numberParams = Call.getNumberOfParams(s);    //-#if RVM_FOR_32_ADDR    int parameterWords = 0;    for (int i = 0; i < numberParams; i++) {      parameterWords++;      OPT_Operand op = Call.getParam(s, i);      if (op instanceof OPT_RegisterOperand) {        OPT_RegisterOperand reg = (OPT_RegisterOperand)op;        if (reg.type.isLongType() || reg.type.isDoubleType())          parameterWords++;      } else if ((op instanceof OPT_LongConstantOperand) ||                  (op instanceof OPT_DoubleConstantOperand))        parameterWords++;    }    //-#endif    //-#if RVM_FOR_64_ADDR    int parameterWords = numberParams;    //-#endif    // see PowerPC Compiler Writer's Guide, pp. 162    ir.stackManager.allocateParameterSpace((6 + parameterWords)*BYTES_IN_ADDRESS);    // 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 = Store.create(REF_STORE, ir.regpool.makeJTOCOp(ir,s),                                       ir.regpool.makeFPOp(),                                       I(20), null);         // TODO: valid location?    s.insertBack(s2);    s.insertBack(Move.create(REF_MOVE, ir.regpool.makeJTOCOp(ir,s), toc));    Call.mutate0(s, SYSCALL, Call.getClearResult(s), ip, null);    s2 = Load.create(REF_LOAD, ir.regpool.makeJTOCOp(ir,s), ir.regpool.makeFPOp(),                     I(20), null);         // TODO: valid location?    s.insertFront(s2);    //-#if RVM_FOR_32_ADDR    OPT_RegisterOperand temp = ir.regpool.makeTempInt();    s2 = Move.create(REF_MOVE, temp, I(ir.compiledMethod.getId()));    //-#endif    //-#if RVM_FOR_64_ADDR    // KV: to get it stored in the right half:    OPT_RegisterOperand temp = ir.regpool.makeTempLong();    s2 = Move.create(REF_MOVE, temp, LC(ir.compiledMethod.getId()));    //-#endif    OPT_Instruction s3 = Store.create(REF_STORE, temp.copy(),                                       ir.regpool.makeFPOp(),                                       I(STACKFRAME_METHOD_ID_OFFSET), null);  // TODO: valid location?    s.insertFront(s3);    s.insertFront(s2);  }