int   ipOffset = VM_Entrypoints.registersIPField.getOffset(); int fprsOffset = VM_Entrypoints.registersFPRsField.getOffset(); int gprsOffset = VM_Entrypoints.registersGPRsField.getOffset(); int lrOffset   = VM_Entrypoints.registersLRField.getOffset();
int   ipOffset = VM_Entrypoints.registersIPField.getOffsetAsInt(); int fprsOffset = VM_Entrypoints.registersFPRsField.getOffsetAsInt(); int gprsOffset = VM_Entrypoints.registersGPRsField.getOffsetAsInt(); int lrOffset   = VM_Entrypoints.registersLRField.getOffsetAsInt();
  private static VM_CodeArray generateRestoreHardwareExceptionStateInstructions() {    VM_Assembler asm = new VM_Assembler(0);    int   ipOffset = VM_Entrypoints.registersIPField.getOffset();    int fprsOffset = VM_Entrypoints.registersFPRsField.getOffset();    int gprsOffset = VM_Entrypoints.registersGPRsField.getOffset();    int lrOffset   = VM_Entrypoints.registersLRField.getOffset();    // restore LR    //    asm.emitLAddr(REGISTER_ZERO, lrOffset, T0);    asm.emitMTLR(REGISTER_ZERO);    // restore IP (hold it in CT register for a moment)    //    asm.emitLAddr(REGISTER_ZERO, ipOffset, T0);    asm.emitMTCTR(REGISTER_ZERO);          // restore fprs    //    asm.emitLAddr(T1, fprsOffset, T0); // T1 := registers.fprs[]    for (int i = 0; i < NUM_FPRS; ++i)      asm.emitLFD(i, i<<LOG_BYTES_IN_DOUBLE, T1);    // restore gprs    //    asm.emitLAddr(T1, gprsOffset, T0); // T1 := registers.gprs[]    for (int i = FIRST_NONVOLATILE_GPR; i <= LAST_NONVOLATILE_GPR; ++i)      asm.emitLAddr(i, i<<LOG_BYTES_IN_ADDRESS, T1);    for (int i = FIRST_SCRATCH_GPR; i <= LAST_SCRATCH_GPR; ++i)      asm.emitLAddr(i, i<<LOG_BYTES_IN_ADDRESS, T1);    for (int i = FIRST_VOLATILE_GPR; i <= LAST_VOLATILE_GPR; ++i)      if (i != T1)        asm.emitLAddr(i, i<<LOG_BYTES_IN_ADDRESS, T1);    // restore specials    //    asm.emitLAddr(REGISTER_ZERO, REGISTER_ZERO<<LOG_BYTES_IN_ADDRESS, T1);    asm.emitLAddr(FP, FP<<LOG_BYTES_IN_ADDRESS, T1);          // restore last gpr    //    asm.emitLAddr(T1, T1<<LOG_BYTES_IN_ADDRESS, T1);    // resume execution at IP    //    asm.emitBCCTR();    return asm.makeMachineCode().getInstructions();  }