Remove InfoVars::memory (bug 5844 part 4, r=ds).
This commit is contained in:
parent
8391c83121
commit
5935070dfa
@ -1762,7 +1762,7 @@ GenerateEntry(void **retp)
|
|||||||
AssemblerX86 masm;
|
AssemblerX86 masm;
|
||||||
|
|
||||||
// Variables we're passed in:
|
// Variables we're passed in:
|
||||||
// void *vars[], void *entry
|
// InfoVars *vars, void *entry, uint8_t *memory
|
||||||
|
|
||||||
__ push(ebp);
|
__ push(ebp);
|
||||||
__ movl(ebp, esp);
|
__ movl(ebp, esp);
|
||||||
@ -1773,7 +1773,7 @@ GenerateEntry(void **retp)
|
|||||||
|
|
||||||
__ movl(esi, Operand(ebp, 8 + 4 * 0));
|
__ movl(esi, Operand(ebp, 8 + 4 * 0));
|
||||||
__ movl(ecx, Operand(ebp, 8 + 4 * 1));
|
__ 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));
|
__ movl(edx, Operand(esi, AMX_INFO_CONTEXT));
|
||||||
|
|
||||||
// Set up run-time registers.
|
// Set up run-time registers.
|
||||||
@ -1956,7 +1956,7 @@ bool CompData::SetOption(const char *key, const char *val)
|
|||||||
return false;
|
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 JITX86::InvokeFunction(BaseRuntime *runtime, JitFunction *fn, cell_t *result)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
@ -1971,11 +1971,10 @@ int JITX86::InvokeFunction(BaseRuntime *runtime, JitFunction *fn, cell_t *result
|
|||||||
vars.rval = result;
|
vars.rval = result;
|
||||||
vars.ctx = ctx;
|
vars.ctx = ctx;
|
||||||
vars.cip = fn->GetPCodeAddress();
|
vars.cip = fn->GetPCodeAddress();
|
||||||
vars.memory = runtime->plugin()->memory;
|
|
||||||
/* vars.esp will be set in the entry code */
|
/* vars.esp will be set in the entry code */
|
||||||
|
|
||||||
pfn = (JIT_EXECUTE)m_pJitEntry;
|
pfn = (JIT_EXECUTE)m_pJitEntry;
|
||||||
err = pfn(&vars, fn->GetEntryAddress());
|
err = pfn(&vars, fn->GetEntryAddress(), runtime->plugin()->memory);
|
||||||
|
|
||||||
ctx->hp = vars.hp;
|
ctx->hp = vars.hp;
|
||||||
ctx->err_cip = vars.cip;
|
ctx->err_cip = vars.cip;
|
||||||
|
@ -200,7 +200,6 @@ struct InfoVars {
|
|||||||
cell_t *rval;
|
cell_t *rval;
|
||||||
sp_context_t *ctx;
|
sp_context_t *ctx;
|
||||||
ucell_t cip;
|
ucell_t cip;
|
||||||
uint8_t *memory;
|
|
||||||
void *esp;
|
void *esp;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -209,7 +208,6 @@ struct InfoVars {
|
|||||||
#define AMX_INFO_RETVAL offsetof(InfoVars, rval)
|
#define AMX_INFO_RETVAL offsetof(InfoVars, rval)
|
||||||
#define AMX_INFO_CONTEXT offsetof(InfoVars, ctx)
|
#define AMX_INFO_CONTEXT offsetof(InfoVars, ctx)
|
||||||
#define AMX_INFO_CIP offsetof(InfoVars, cip)
|
#define AMX_INFO_CIP offsetof(InfoVars, cip)
|
||||||
#define AMX_INFO_MEMORY offsetof(InfoVars, memory)
|
|
||||||
#define AMX_INFO_NSTACK offsetof(InfoVars, esp)
|
#define AMX_INFO_NSTACK offsetof(InfoVars, esp)
|
||||||
|
|
||||||
extern Knight::KeCodeCache *g_pCodeCache;
|
extern Knight::KeCodeCache *g_pCodeCache;
|
||||||
|
Loading…
Reference in New Issue
Block a user