Fix some portability issues with the JIT compiler.
This commit is contained in:
@@ -211,10 +211,15 @@ int luaJIT_setmode(lua_State *L, int idx, int mode)
|
||||
} else {
|
||||
if (!(mode & LUAJIT_MODE_ON))
|
||||
G2J(g)->flags &= ~(uint32_t)JIT_F_ON;
|
||||
#if LJ_TARGET_X86ORX64
|
||||
else if ((G2J(g)->flags & JIT_F_SSE2))
|
||||
G2J(g)->flags |= (uint32_t)JIT_F_ON;
|
||||
else
|
||||
return 0; /* Don't turn on JIT compiler without SSE2 support. */
|
||||
#else
|
||||
else
|
||||
G2J(g)->flags |= (uint32_t)JIT_F_ON;
|
||||
#endif
|
||||
lj_dispatch_update(g);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user