Just disable JIT compiler for non-SSE2 CPUs instead of aborting.

This commit is contained in:
Mike Pall
2010-02-16 23:39:24 +01:00
parent c225ee8db4
commit 8060f5b531
4 changed files with 27 additions and 18 deletions

View File

@@ -209,10 +209,12 @@ int luaJIT_setmode(lua_State *L, int idx, int mode)
if ((mode & LUAJIT_MODE_FLUSH)) {
lj_trace_flushall(L);
} else {
if ((mode & LUAJIT_MODE_ON))
if (!(mode & LUAJIT_MODE_ON))
G2J(g)->flags &= ~(uint32_t)JIT_F_ON;
else if ((G2J(g)->flags & JIT_F_SSE2))
G2J(g)->flags |= (uint32_t)JIT_F_ON;
else
G2J(g)->flags &= ~(uint32_t)JIT_F_ON;
return 0; /* Don't turn on JIT compiler without SSE2 support. */
lj_dispatch_update(g);
}
break;