1.1 --- a/sourcepawn/jit/x86/jit_x86.cpp Mon Aug 12 00:22:41 2013 +0100
1.2 +++ b/sourcepawn/jit/x86/jit_x86.cpp Mon Aug 12 00:22:54 2013 +0100
1.3 @@ -1298,7 +1298,7 @@
1.4 case OP_BREAK:
1.5 {
1.6 cell_t cip = uintptr_t(cip_ - 1) - uintptr_t(plugin_->pcode);
1.7 - __ movl(Operand(info, AMX_INFO_CIP), cip);
1.8 + __ movl(Operand(cipAddr()), cip);
1.9 break;
1.10 }
1.11
1.12 @@ -1486,7 +1486,7 @@
1.13 __ addl(Operand(eax, offsetof(sp_context_t, rp)), 1);
1.14
1.15 // Store the CIP of the function we're about to call.
1.16 - __ movl(Operand(info, AMX_INFO_CIP), offset);
1.17 + __ movl(Operand(cipAddr()), offset);
1.18
1.19 JitFunction *fun = rt_->GetJittedFunctionByOffset(offset);
1.20 if (!fun) {
1.21 @@ -1501,7 +1501,7 @@
1.22 }
1.23
1.24 // Restore the last cip.
1.25 - __ movl(Operand(info, AMX_INFO_CIP), cip);
1.26 + __ movl(Operand(cipAddr()), cip);
1.27
1.28 // Mark us as leaving the last frame.
1.29 __ movl(tmp, intptr_t(rt_->GetBaseContext()->GetCtx()));
1.30 @@ -1544,7 +1544,7 @@
1.31 __ ret();
1.32
1.33 __ bind(&error);
1.34 - __ movl(Operand(info, AMX_INFO_CIP), thunk->pcode_offset);
1.35 + __ movl(Operand(cipAddr()), thunk->pcode_offset);
1.36 __ jmp(g_Jit.GetUniversalReturn());
1.37 }
1.38 }
1.39 @@ -1972,10 +1972,11 @@
1.40 {
1.41 sp_context_t *ctx = runtime->GetBaseContext()->GetCtx();
1.42
1.43 + ctx->cip = fn->GetPCodeAddress();
1.44 +
1.45 InfoVars vars;
1.46 vars.frm = ctx->sp;
1.47 vars.hp = ctx->hp;
1.48 - vars.cip = fn->GetPCodeAddress();
1.49 /* vars.esp will be set in the entry code */
1.50
1.51 JIT_EXECUTE pfn = (JIT_EXECUTE)m_pJitEntry;
1.52 @@ -1983,7 +1984,6 @@
1.53
1.54 ctx->sp = vars.frm;
1.55 ctx->hp = vars.hp;
1.56 - ctx->err_cip = vars.cip;
1.57
1.58 *result = ctx->rval;
1.59 return err;