mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Avoid zero-sized arrays in jit_State.
This commit is contained in:
parent
b32e94856b
commit
96157d360d
@ -372,6 +372,7 @@ enum {
|
||||
#endif
|
||||
LJ_K64__MAX,
|
||||
};
|
||||
#define LJ_K64__USED (LJ_TARGET_X86ORX64 || LJ_TARGET_MIPS)
|
||||
|
||||
enum {
|
||||
#if LJ_TARGET_X86ORX64
|
||||
@ -390,6 +391,7 @@ enum {
|
||||
#endif
|
||||
LJ_K32__MAX
|
||||
};
|
||||
#define LJ_K32__USED (LJ_TARGET_X86ORX64 || LJ_TARGET_PPC || LJ_TARGET_MIPS)
|
||||
|
||||
/* Get 16 byte aligned pointer to SIMD constant. */
|
||||
#define LJ_KSIMD(J, n) \
|
||||
@ -444,9 +446,13 @@ typedef struct jit_State {
|
||||
int32_t framedepth; /* Current frame depth. */
|
||||
int32_t retdepth; /* Return frame depth (count of RETF). */
|
||||
|
||||
#if LJ_K32__USED
|
||||
uint32_t k32[LJ_K32__MAX]; /* Common 4 byte constants used by backends. */
|
||||
#endif
|
||||
TValue ksimd[LJ_KSIMD__MAX*2+1]; /* 16 byte aligned SIMD constants. */
|
||||
#if LJ_K64__USED
|
||||
TValue k64[LJ_K64__MAX]; /* Common 8 byte constants. */
|
||||
#endif
|
||||
|
||||
IRIns *irbuf; /* Temp. IR instruction buffer. Biased with REF_BIAS. */
|
||||
IRRef irtoplim; /* Upper limit of instuction buffer (biased). */
|
||||
|
Loading…
Reference in New Issue
Block a user