emitLAddr   (S0, VM_Entrypoints.activeThreadField.getOffsetAsInt(), PROCESSOR_REGISTER); emitLAddr   (S0, VM_Entrypoints.jniEnvField.getOffsetAsInt(), S0); emitLInt   ( 0, VM_Entrypoints.JNIRefsTopField.getOffsetAsInt(),S0); emitLAddr   (S0, VM_Entrypoints.activeThreadField.getOffsetAsInt(), PROCESSOR_REGISTER);
emitLAddrOffset   (S0, PROCESSOR_REGISTER, VM_Entrypoints.activeThreadField.getOffset()); emitLAddrOffset   (S0, S0, VM_Entrypoints.jniEnvField.getOffset()); emitLIntOffset   ( 0, S0, VM_Entrypoints.JNIRefsTopField.getOffset()); emitLAddrOffset   (S0, PROCESSOR_REGISTER, VM_Entrypoints.activeThreadField.getOffset());
  public void emitNativeStackOverflowCheck (int frameSize) {    emitLAddr   (S0, VM_Entrypoints.activeThreadField.getOffsetAsInt(), PROCESSOR_REGISTER);   // S0 := thread pointer    emitLAddr   (S0, VM_Entrypoints.jniEnvField.getOffsetAsInt(), S0);      // S0 := thread.jniEnv    emitLInt   ( 0, VM_Entrypoints.JNIRefsTopField.getOffsetAsInt(),S0);   // R0 := thread.jniEnv.JNIRefsTop    emitLAddr   (S0, VM_Entrypoints.activeThreadField.getOffsetAsInt(), PROCESSOR_REGISTER);   // S0 := thread pointer    emitCMPI ( 0, 0);                                    // check if S0 == 0 -> first native frame on stack    VM_ForwardReference fr1 = emitForwardBC(EQ);    // check for enough space for requested frame size    emitLAddr  ( 0,  VM_Entrypoints.stackLimitField.getOffsetAsInt(), S0);  // R0 := &stack guard page    emitADDI(S0, -frameSize, FP);                        // S0 := &new frame pointer    emitTAddrLT (S0,  0);                                    // trap if new frame below guard page    VM_ForwardReference fr2 = emitForwardB();    // check for enough space for STACK_SIZE_JNINATIVE     fr1.resolve(this);    emitLAddr (0,  VM_Entrypoints.stackLimitField.getOffsetAsInt(), S0);  // R0 := &stack guard page    emitLVAL  (S0, STACK_SIZE_JNINATIVE);    emitSUBFC (S0, S0, FP);             // S0 := &new frame pointer    emitCMPLAddr(0, S0);    VM_ForwardReference fr3 = emitForwardBC(LE);    emitTAddrWI ( 1 );                                    // trap if new frame pointer below guard page    fr2.resolve(this);    fr3.resolve(this);  }