mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
ARM: Ensure relative GG_State element alignment differently.
Thanks to jojo59516 and dwing4g.
This commit is contained in:
parent
c4b1e0feae
commit
2211f6f960
@ -70,12 +70,20 @@ typedef uint16_t HotCount;
|
|||||||
typedef struct GG_State {
|
typedef struct GG_State {
|
||||||
lua_State L; /* Main thread. */
|
lua_State L; /* Main thread. */
|
||||||
global_State g; /* Global state. */
|
global_State g; /* Global state. */
|
||||||
|
#if LJ_TARGET_ARM
|
||||||
|
/* Make g reachable via K12 encoded DISPATCH-relative addressing. */
|
||||||
|
uint8_t align1[(16-sizeof(global_State))&15];
|
||||||
|
#endif
|
||||||
#if LJ_TARGET_MIPS
|
#if LJ_TARGET_MIPS
|
||||||
ASMFunction got[LJ_GOT__MAX]; /* Global offset table. */
|
ASMFunction got[LJ_GOT__MAX]; /* Global offset table. */
|
||||||
#endif
|
#endif
|
||||||
#if LJ_HASJIT
|
#if LJ_HASJIT
|
||||||
jit_State J; /* JIT state. */
|
jit_State J; /* JIT state. */
|
||||||
HotCount hotcount[HOTCOUNT_SIZE]; /* Hot counters. */
|
HotCount hotcount[HOTCOUNT_SIZE]; /* Hot counters. */
|
||||||
|
#if LJ_TARGET_ARM
|
||||||
|
/* Ditto for J. */
|
||||||
|
uint8_t align2[(16-sizeof(jit_State)-sizeof(HotCount)*HOTCOUNT_SIZE)&15];
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
ASMFunction dispatch[GG_LEN_DISP]; /* Instruction dispatch tables. */
|
ASMFunction dispatch[GG_LEN_DISP]; /* Instruction dispatch tables. */
|
||||||
BCIns bcff[GG_NUM_ASMFF]; /* Bytecode for ASM fast functions. */
|
BCIns bcff[GG_NUM_ASMFF]; /* Bytecode for ASM fast functions. */
|
||||||
|
@ -406,11 +406,7 @@ typedef struct jit_State {
|
|||||||
size_t szallmcarea; /* Total size of all allocated mcode areas. */
|
size_t szallmcarea; /* Total size of all allocated mcode areas. */
|
||||||
|
|
||||||
TValue errinfo; /* Additional info element for trace errors. */
|
TValue errinfo; /* Additional info element for trace errors. */
|
||||||
}
|
} jit_State;
|
||||||
#if LJ_TARGET_ARM
|
|
||||||
LJ_ALIGN(16) /* For DISPATCH-relative addresses in assembler part. */
|
|
||||||
#endif
|
|
||||||
jit_State;
|
|
||||||
|
|
||||||
/* Trivial PRNG e.g. used for penalty randomization. */
|
/* Trivial PRNG e.g. used for penalty randomization. */
|
||||||
static LJ_AINLINE uint32_t LJ_PRNG_BITS(jit_State *J, int bits)
|
static LJ_AINLINE uint32_t LJ_PRNG_BITS(jit_State *J, int bits)
|
||||||
|
Loading…
Reference in New Issue
Block a user