diff options
author | Mike Pall <mike> | 2012-04-17 12:54:38 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2012-04-17 12:54:38 +0200 |
commit | ac6b678d4c127859f09267c00db99578d73ef47c (patch) | |
tree | 9d5272e4ad4490f2a312dfed1e28b3a577b980c9 | |
parent | 7aa34aa4de7d23c48d4644655adf362aee0b6a10 (diff) | |
download | luajit2-ac6b678d4c127859f09267c00db99578d73ef47c.tar.gz |
FFI: Fix result type of pointer difference.
-rw-r--r-- | src/lj_crecord.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lj_crecord.c b/src/lj_crecord.c index 38d44e4b..a8342015 100644 --- a/src/lj_crecord.c +++ b/src/lj_crecord.c @@ -1005,7 +1005,7 @@ static TRef crec_arith_ptr(jit_State *J, TRef *sp, CType **s, MMS mm) CTSize sz = lj_ctype_size(cts, ctype_cid(ctp->info)); if (sz == 0 || (sz & (sz-1)) != 0) return 0; /* NYI: integer division. */ - tr = emitir(IRT(IR_SUB, IRT_PTR), sp[0], sp[1]); + tr = emitir(IRT(IR_SUB, IRT_INTP), sp[0], sp[1]); tr = emitir(IRT(IR_BSAR, IRT_INTP), tr, lj_ir_kint(J, lj_fls(sz))); #if LJ_64 tr = emitconv(tr, IRT_NUM, IRT_INTP, 0); |