Remove InfoVars::memory (bug 5844 part 4, r=ds).
authorDavid Anderson <dvander@alliedmods.net>
Sun Aug 11 11:33:29 2013 -0700 (2013-08-11)
changeset 398705ab44d7ec01
parent 3986 f49be7182920
child 3988 f947f2955ae0
Remove InfoVars::memory (bug 5844 part 4, r=ds).
sourcepawn/jit/x86/jit_x86.cpp
sourcepawn/jit/x86/jit_x86.h
     1.1 --- a/sourcepawn/jit/x86/jit_x86.cpp	Sun Aug 11 11:31:55 2013 -0700
     1.2 +++ b/sourcepawn/jit/x86/jit_x86.cpp	Sun Aug 11 11:33:29 2013 -0700
     1.3 @@ -1762,7 +1762,7 @@
     1.4    AssemblerX86 masm;
     1.5  
     1.6    // Variables we're passed in:
     1.7 -  //  void *vars[], void *entry
     1.8 +  //  InfoVars *vars, void *entry, uint8_t *memory
     1.9  
    1.10    __ push(ebp);
    1.11    __ movl(ebp, esp);
    1.12 @@ -1773,7 +1773,7 @@
    1.13  
    1.14    __ movl(esi, Operand(ebp, 8 + 4 * 0));
    1.15    __ movl(ecx, Operand(ebp, 8 + 4 * 1));
    1.16 -  __ movl(eax, Operand(esi, AMX_INFO_MEMORY));
    1.17 +  __ movl(eax, Operand(ebp, 8 + 4 * 2));
    1.18    __ movl(edx, Operand(esi, AMX_INFO_CONTEXT));
    1.19  
    1.20    // Set up run-time registers.
    1.21 @@ -1956,7 +1956,7 @@
    1.22    return false;
    1.23  }
    1.24  
    1.25 -typedef int (*JIT_EXECUTE)(InfoVars *vars, void *addr);
    1.26 +typedef int (*JIT_EXECUTE)(InfoVars *vars, void *addr, uint8_t *memory);
    1.27  int JITX86::InvokeFunction(BaseRuntime *runtime, JitFunction *fn, cell_t *result)
    1.28  {
    1.29    int err;
    1.30 @@ -1971,11 +1971,10 @@
    1.31    vars.rval = result;
    1.32    vars.ctx = ctx;
    1.33    vars.cip = fn->GetPCodeAddress();
    1.34 -  vars.memory = runtime->plugin()->memory;
    1.35    /* vars.esp will be set in the entry code */
    1.36  
    1.37    pfn = (JIT_EXECUTE)m_pJitEntry;
    1.38 -  err = pfn(&vars, fn->GetEntryAddress());
    1.39 +  err = pfn(&vars, fn->GetEntryAddress(), runtime->plugin()->memory);
    1.40  
    1.41    ctx->hp = vars.hp;
    1.42    ctx->err_cip = vars.cip;
     2.1 --- a/sourcepawn/jit/x86/jit_x86.h	Sun Aug 11 11:31:55 2013 -0700
     2.2 +++ b/sourcepawn/jit/x86/jit_x86.h	Sun Aug 11 11:33:29 2013 -0700
     2.3 @@ -200,7 +200,6 @@
     2.4      cell_t *rval;
     2.5      sp_context_t *ctx;
     2.6      ucell_t cip;
     2.7 -    uint8_t *memory;
     2.8      void *esp;
     2.9  };
    2.10  
    2.11 @@ -209,7 +208,6 @@
    2.12  #define AMX_INFO_RETVAL         offsetof(InfoVars, rval)
    2.13  #define AMX_INFO_CONTEXT        offsetof(InfoVars, ctx)
    2.14  #define AMX_INFO_CIP            offsetof(InfoVars, cip)
    2.15 -#define AMX_INFO_MEMORY         offsetof(InfoVars, memory)
    2.16  #define AMX_INFO_NSTACK         offsetof(InfoVars, esp)
    2.17  
    2.18  extern Knight::KeCodeCache *g_pCodeCache;