issue #169 nan and inf literal generated by JIT C codegen, but these are not valid literals. Temporarily use macros to replace these but a better fix is needed

asmvm
Dibyendu Majumdar 4 years ago
parent e85d471bcd
commit b57e778b55

@ -592,8 +592,12 @@ static const char Lua_header[] =
" (ttisfloat(o) ? ((n) = fltvalue(o), 1) : \\\n"
" (ttisinteger(o) ? ((n) = cast_num(ivalue(o)), 1) : 0))\n"
"#define intop(op,v1,v2) l_castU2S(l_castS2U(v1) op l_castS2U(v2))\n"
"#define nan (0./0.)\n"
"#define inf (1./0.)\n"
"#define luai_numunm(L,a) (-(a))\n";
// FIXME - 'inf' and 'nan' above need to be sorted!
// We can only compile a subset of op codes
// and not all features are supported
bool raviJ_cancompile(Proto *p) { (void)p; return true; }

Loading…
Cancel
Save