mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-08 15:34:09 +00:00
Added a JIT flag for AVX1 support
This commit is contained in:
parent
a374e90531
commit
239f8ad3e6
@ -661,6 +661,7 @@ static uint32_t jit_cpudetect(lua_State *L)
|
|||||||
#if LJ_HASJIT
|
#if LJ_HASJIT
|
||||||
flags |= ((features[2] >> 0)&1) * JIT_F_SSE3;
|
flags |= ((features[2] >> 0)&1) * JIT_F_SSE3;
|
||||||
flags |= ((features[2] >> 19)&1) * JIT_F_SSE4_1;
|
flags |= ((features[2] >> 19)&1) * JIT_F_SSE4_1;
|
||||||
|
flags |= ((features[2] >> 28)&1) * JIT_F_AVX1;
|
||||||
if (vendor[2] == 0x6c65746e) { /* Intel. */
|
if (vendor[2] == 0x6c65746e) { /* Intel. */
|
||||||
if ((features[0] & 0x0fff0ff0) == 0x000106c0) /* Atom. */
|
if ((features[0] & 0x0fff0ff0) == 0x000106c0) /* Atom. */
|
||||||
flags |= JIT_F_LEA_AGU;
|
flags |= JIT_F_LEA_AGU;
|
||||||
|
@ -20,10 +20,11 @@
|
|||||||
#define JIT_F_PREFER_IMUL 0x00000080
|
#define JIT_F_PREFER_IMUL 0x00000080
|
||||||
#define JIT_F_LEA_AGU 0x00000100
|
#define JIT_F_LEA_AGU 0x00000100
|
||||||
#define JIT_F_BMI2 0x00000200
|
#define JIT_F_BMI2 0x00000200
|
||||||
|
#define JIT_F_AVX1 0x00000400
|
||||||
|
|
||||||
/* Names for the CPU-specific flags. Must match the order above. */
|
/* Names for the CPU-specific flags. Must match the order above. */
|
||||||
#define JIT_F_CPU_FIRST JIT_F_SSE2
|
#define JIT_F_CPU_FIRST JIT_F_SSE2
|
||||||
#define JIT_F_CPUSTRING "\4SSE2\4SSE3\6SSE4.1\3AMD\4ATOM\4BMI2"
|
#define JIT_F_CPUSTRING "\4SSE2\4SSE3\6SSE4.1\3AMD\4ATOM\4BMI2\4AVX1"
|
||||||
#elif LJ_TARGET_ARM
|
#elif LJ_TARGET_ARM
|
||||||
#define JIT_F_ARMV6_ 0x00000010
|
#define JIT_F_ARMV6_ 0x00000010
|
||||||
#define JIT_F_ARMV6T2_ 0x00000020
|
#define JIT_F_ARMV6T2_ 0x00000020
|
||||||
|
Loading…
Reference in New Issue
Block a user