aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pall <mike>2012-04-17 12:54:38 +0200
committerMike Pall <mike>2012-04-17 12:54:38 +0200
commitac6b678d4c127859f09267c00db99578d73ef47c (patch)
tree9d5272e4ad4490f2a312dfed1e28b3a577b980c9
parent7aa34aa4de7d23c48d4644655adf362aee0b6a10 (diff)
downloadluajit-ac6b678d4c127859f09267c00db99578d73ef47c.tar.gz
luajit-ac6b678d4c127859f09267c00db99578d73ef47c.tar.bz2
luajit-ac6b678d4c127859f09267c00db99578d73ef47c.zip
FFI: Fix result type of pointer difference.
-rw-r--r--src/lj_crecord.c2
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)
1005 CTSize sz = lj_ctype_size(cts, ctype_cid(ctp->info)); 1005 CTSize sz = lj_ctype_size(cts, ctype_cid(ctp->info));
1006 if (sz == 0 || (sz & (sz-1)) != 0) 1006 if (sz == 0 || (sz & (sz-1)) != 0)
1007 return 0; /* NYI: integer division. */ 1007 return 0; /* NYI: integer division. */
1008 tr = emitir(IRT(IR_SUB, IRT_PTR), sp[0], sp[1]); 1008 tr = emitir(IRT(IR_SUB, IRT_INTP), sp[0], sp[1]);
1009 tr = emitir(IRT(IR_BSAR, IRT_INTP), tr, lj_ir_kint(J, lj_fls(sz))); 1009 tr = emitir(IRT(IR_BSAR, IRT_INTP), tr, lj_ir_kint(J, lj_fls(sz)));
1010#if LJ_64 1010#if LJ_64
1011 tr = emitconv(tr, IRT_NUM, IRT_INTP, 0); 1011 tr = emitconv(tr, IRT_NUM, IRT_INTP, 0);