# HG changeset patch # User David Anderson # Date 1376246009 25200 # Node ID 05ab44d7ec012f3c2bc86da77cdc404d0fa2333c # Parent f49be71829204b47da7264cf1bf171ae00d2aa2f Remove InfoVars::memory (bug 5844 part 4, r=ds). diff -r f49be7182920 -r 05ab44d7ec01 sourcepawn/jit/x86/jit_x86.cpp --- a/sourcepawn/jit/x86/jit_x86.cpp Sun Aug 11 11:31:55 2013 -0700 +++ b/sourcepawn/jit/x86/jit_x86.cpp Sun Aug 11 11:33:29 2013 -0700 @@ -1762,7 +1762,7 @@ AssemblerX86 masm; // Variables we're passed in: - // void *vars[], void *entry + // InfoVars *vars, void *entry, uint8_t *memory __ push(ebp); __ movl(ebp, esp); @@ -1773,7 +1773,7 @@ __ movl(esi, Operand(ebp, 8 + 4 * 0)); __ movl(ecx, Operand(ebp, 8 + 4 * 1)); - __ movl(eax, Operand(esi, AMX_INFO_MEMORY)); + __ movl(eax, Operand(ebp, 8 + 4 * 2)); __ movl(edx, Operand(esi, AMX_INFO_CONTEXT)); // Set up run-time registers. @@ -1956,7 +1956,7 @@ return false; } -typedef int (*JIT_EXECUTE)(InfoVars *vars, void *addr); +typedef int (*JIT_EXECUTE)(InfoVars *vars, void *addr, uint8_t *memory); int JITX86::InvokeFunction(BaseRuntime *runtime, JitFunction *fn, cell_t *result) { int err; @@ -1971,11 +1971,10 @@ vars.rval = result; vars.ctx = ctx; vars.cip = fn->GetPCodeAddress(); - vars.memory = runtime->plugin()->memory; /* vars.esp will be set in the entry code */ pfn = (JIT_EXECUTE)m_pJitEntry; - err = pfn(&vars, fn->GetEntryAddress()); + err = pfn(&vars, fn->GetEntryAddress(), runtime->plugin()->memory); ctx->hp = vars.hp; ctx->err_cip = vars.cip; diff -r f49be7182920 -r 05ab44d7ec01 sourcepawn/jit/x86/jit_x86.h --- a/sourcepawn/jit/x86/jit_x86.h Sun Aug 11 11:31:55 2013 -0700 +++ b/sourcepawn/jit/x86/jit_x86.h Sun Aug 11 11:33:29 2013 -0700 @@ -200,7 +200,6 @@ cell_t *rval; sp_context_t *ctx; ucell_t cip; - uint8_t *memory; void *esp; }; @@ -209,7 +208,6 @@ #define AMX_INFO_RETVAL offsetof(InfoVars, rval) #define AMX_INFO_CONTEXT offsetof(InfoVars, ctx) #define AMX_INFO_CIP offsetof(InfoVars, cip) -#define AMX_INFO_MEMORY offsetof(InfoVars, memory) #define AMX_INFO_NSTACK offsetof(InfoVars, esp) extern Knight::KeCodeCache *g_pCodeCache;