diff options
Diffstat (limited to 'src/lj_ccallback.c')
-rw-r--r-- | src/lj_ccallback.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/lj_ccallback.c b/src/lj_ccallback.c index 482553f0..c3f37f2d 100644 --- a/src/lj_ccallback.c +++ b/src/lj_ccallback.c | |||
@@ -25,7 +25,14 @@ | |||
25 | 25 | ||
26 | #define CALLBACK_MCODE_SIZE (LJ_PAGESIZE * LJ_NUM_CBPAGE) | 26 | #define CALLBACK_MCODE_SIZE (LJ_PAGESIZE * LJ_NUM_CBPAGE) |
27 | 27 | ||
28 | #if LJ_TARGET_X86ORX64 | 28 | #if LJ_OS_NOJIT |
29 | |||
30 | /* Disabled callback support. */ | ||
31 | #define CALLBACK_SLOT2OFS(slot) (0*(slot)) | ||
32 | #define CALLBACK_OFS2SLOT(ofs) (0*(ofs)) | ||
33 | #define CALLBACK_MAX_SLOT 0 | ||
34 | |||
35 | #elif LJ_TARGET_X86ORX64 | ||
29 | 36 | ||
30 | #define CALLBACK_MCODE_HEAD (LJ_64 ? 8 : 0) | 37 | #define CALLBACK_MCODE_HEAD (LJ_64 ? 8 : 0) |
31 | #define CALLBACK_MCODE_GROUP (-2+1+2+5+(LJ_64 ? 6 : 5)) | 38 | #define CALLBACK_MCODE_GROUP (-2+1+2+5+(LJ_64 ? 6 : 5)) |
@@ -93,7 +100,10 @@ MSize lj_ccallback_ptr2slot(CTState *cts, void *p) | |||
93 | } | 100 | } |
94 | 101 | ||
95 | /* Initialize machine code for callback function pointers. */ | 102 | /* Initialize machine code for callback function pointers. */ |
96 | #if LJ_TARGET_X86ORX64 | 103 | #if LJ_OS_NOJIT |
104 | /* Disabled callback support. */ | ||
105 | #define callback_mcode_init(g, p) UNUSED(p) | ||
106 | #elif LJ_TARGET_X86ORX64 | ||
97 | static void callback_mcode_init(global_State *g, uint8_t *page) | 107 | static void callback_mcode_init(global_State *g, uint8_t *page) |
98 | { | 108 | { |
99 | uint8_t *p = page; | 109 | uint8_t *p = page; |