mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 15:14:08 +00:00
Fix for cdata vs. non-cdata arithmetics/comparisons.
Thanks to Vyacheslav Egorov.
This commit is contained in:
parent
1914de71c7
commit
b74ddaf174
@ -1205,7 +1205,7 @@ void LJ_FASTCALL recff_cdata_call(jit_State *J, RecordFFData *rd)
|
||||
|
||||
static TRef crec_arith_int64(jit_State *J, TRef *sp, CType **s, MMS mm)
|
||||
{
|
||||
if (ctype_isnum(s[0]->info) && ctype_isnum(s[1]->info)) {
|
||||
if (sp[0] && sp[1] && ctype_isnum(s[0]->info) && ctype_isnum(s[1]->info)) {
|
||||
IRType dt;
|
||||
CTypeID id;
|
||||
TRef tr;
|
||||
@ -1263,6 +1263,7 @@ static TRef crec_arith_ptr(jit_State *J, TRef *sp, CType **s, MMS mm)
|
||||
{
|
||||
CTState *cts = ctype_ctsG(J2G(J));
|
||||
CType *ctp = s[0];
|
||||
if (!(sp[0] && sp[1])) return 0;
|
||||
if (ctype_isptr(ctp->info) || ctype_isrefarray(ctp->info)) {
|
||||
if ((mm == MM_sub || mm == MM_eq || mm == MM_lt || mm == MM_le) &&
|
||||
(ctype_isptr(s[1]->info) || ctype_isrefarray(s[1]->info))) {
|
||||
|
Loading…
Reference in New Issue
Block a user