MIPS: Add interpreter. Enable MIPS build rules.
This commit is contained in:
@@ -8,6 +8,10 @@
|
||||
|
||||
#include "lj_obj.h"
|
||||
#include "lj_err.h"
|
||||
#include "lj_func.h"
|
||||
#include "lj_str.h"
|
||||
#include "lj_tab.h"
|
||||
#include "lj_meta.h"
|
||||
#include "lj_debug.h"
|
||||
#include "lj_state.h"
|
||||
#include "lj_frame.h"
|
||||
@@ -16,6 +20,9 @@
|
||||
#if LJ_HASJIT
|
||||
#include "lj_jit.h"
|
||||
#endif
|
||||
#if LJ_HASFFI
|
||||
#include "lj_ccallback.h"
|
||||
#endif
|
||||
#include "lj_trace.h"
|
||||
#include "lj_dispatch.h"
|
||||
#include "lj_vm.h"
|
||||
@@ -26,6 +33,18 @@ LJ_STATIC_ASSERT(GG_NUM_ASMFF == FF_NUM_ASMFUNC);
|
||||
|
||||
/* -- Dispatch table management ------------------------------------------- */
|
||||
|
||||
#if LJ_TARGET_MIPS
|
||||
#include <math.h>
|
||||
LJ_FUNCA_NORET void LJ_FASTCALL lj_ffh_coroutine_wrap_err(lua_State *L,
|
||||
lua_State *co);
|
||||
|
||||
#define GOTFUNC(name) (ASMFunction)name,
|
||||
static const ASMFunction dispatch_got[] = {
|
||||
GOTDEF(GOTFUNC)
|
||||
};
|
||||
#undef GOTFUNC
|
||||
#endif
|
||||
|
||||
/* Initialize instruction dispatch table and hot counters. */
|
||||
void lj_dispatch_init(GG_State *GG)
|
||||
{
|
||||
@@ -44,6 +63,9 @@ void lj_dispatch_init(GG_State *GG)
|
||||
GG->g.bc_cfunc_ext = GG->g.bc_cfunc_int = BCINS_AD(BC_FUNCC, LUA_MINSTACK, 0);
|
||||
for (i = 0; i < GG_NUM_ASMFF; i++)
|
||||
GG->bcff[i] = BCINS_AD(BC__MAX+i, 0, 0);
|
||||
#if LJ_TARGET_MIPS
|
||||
memcpy(GG->got, dispatch_got, LJ_GOT__MAX*4);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if LJ_HASJIT
|
||||
|
||||
Reference in New Issue
Block a user