FFI: Fix recording of pointer arithmetic.

This commit is contained in:
Mike Pall 2011-02-07 23:42:51 +01:00
parent 97d0874ff5
commit fb53d4aeb7

View File

@ -841,7 +841,7 @@ static TRef crec_arith_ptr(jit_State *J, TRef *sp, CType **s, MMS mm)
}
#endif
tr = emitir(IRT(IR_MUL, IRT_INTP), tr, lj_ir_kintp(J, sz));
tr = emitir(IRT(IR_ADD, IRT_PTR), sp[0], tr);
tr = emitir(IRT(mm+(int)IR_ADD-(int)MM_add, IRT_PTR), sp[0], tr);
id = lj_ctype_intern(cts, CTINFO(CT_PTR, CTALIGN_PTR|ctype_cid(ctp->info)),
CTSIZE_PTR);
return emitir(IRTG(IR_CNEWI, IRT_CDATA), lj_ir_kint(J, id), tr);