diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lj_dispatch.h | 8 | ||||
| -rw-r--r-- | src/lj_jit.h | 6 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/lj_dispatch.h b/src/lj_dispatch.h index 4ea6e85d..58ddff51 100644 --- a/src/lj_dispatch.h +++ b/src/lj_dispatch.h | |||
| @@ -89,12 +89,20 @@ typedef uint16_t HotCount; | |||
| 89 | typedef struct GG_State { | 89 | typedef struct GG_State { |
| 90 | lua_State L; /* Main thread. */ | 90 | lua_State L; /* Main thread. */ |
| 91 | global_State g; /* Global state. */ | 91 | global_State g; /* Global state. */ |
| 92 | #if LJ_TARGET_ARM | ||
| 93 | /* Make g reachable via K12 encoded DISPATCH-relative addressing. */ | ||
| 94 | uint8_t align1[(16-sizeof(global_State))&15]; | ||
| 95 | #endif | ||
| 92 | #if LJ_TARGET_MIPS | 96 | #if LJ_TARGET_MIPS |
| 93 | ASMFunction got[LJ_GOT__MAX]; /* Global offset table. */ | 97 | ASMFunction got[LJ_GOT__MAX]; /* Global offset table. */ |
| 94 | #endif | 98 | #endif |
| 95 | #if LJ_HASJIT | 99 | #if LJ_HASJIT |
| 96 | jit_State J; /* JIT state. */ | 100 | jit_State J; /* JIT state. */ |
| 97 | HotCount hotcount[HOTCOUNT_SIZE]; /* Hot counters. */ | 101 | HotCount hotcount[HOTCOUNT_SIZE]; /* Hot counters. */ |
| 102 | #if LJ_TARGET_ARM | ||
| 103 | /* Ditto for J. */ | ||
| 104 | uint8_t align2[(16-sizeof(jit_State)-sizeof(HotCount)*HOTCOUNT_SIZE)&15]; | ||
| 105 | #endif | ||
| 98 | #endif | 106 | #endif |
| 99 | ASMFunction dispatch[GG_LEN_DISP]; /* Instruction dispatch tables. */ | 107 | ASMFunction dispatch[GG_LEN_DISP]; /* Instruction dispatch tables. */ |
| 100 | BCIns bcff[GG_NUM_ASMFF]; /* Bytecode for ASM fast functions. */ | 108 | BCIns bcff[GG_NUM_ASMFF]; /* Bytecode for ASM fast functions. */ |
diff --git a/src/lj_jit.h b/src/lj_jit.h index b0d90fcd..655b84c3 100644 --- a/src/lj_jit.h +++ b/src/lj_jit.h | |||
| @@ -503,11 +503,7 @@ typedef struct jit_State { | |||
| 503 | BCLine prev_line; /* Previous line. */ | 503 | BCLine prev_line; /* Previous line. */ |
| 504 | int prof_mode; /* Profiling mode: 0, 'f', 'l'. */ | 504 | int prof_mode; /* Profiling mode: 0, 'f', 'l'. */ |
| 505 | #endif | 505 | #endif |
| 506 | } | 506 | } jit_State; |
| 507 | #if LJ_TARGET_ARM | ||
| 508 | LJ_ALIGN(16) /* For DISPATCH-relative addresses in assembler part. */ | ||
| 509 | #endif | ||
| 510 | jit_State; | ||
| 511 | 507 | ||
| 512 | #ifdef LUA_USE_ASSERT | 508 | #ifdef LUA_USE_ASSERT |
| 513 | #define lj_assertJ(c, ...) lj_assertG_(J2G(J), (c), __VA_ARGS__) | 509 | #define lj_assertJ(c, ...) lj_assertG_(J2G(J), (c), __VA_ARGS__) |
