diff options
author | Mike Pall <mike> | 2010-12-30 00:42:00 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2010-12-30 00:42:00 +0100 |
commit | 158de60b8c5a46b3f00c00ae54ed026ef46487b3 (patch) | |
tree | 9f9f841160cb72364736a2ebc9c058d68dee632d /src/lj_cconv.c | |
parent | 8bcc5ed021b9c683d7e254dc9e0937eaa40f6d64 (diff) | |
download | luajit2-158de60b8c5a46b3f00c00ae54ed026ef46487b3.tar.gz |
Refactoring of conversion ops, part 2: cleanup cdata conversions.
Diffstat (limited to 'src/lj_cconv.c')
-rw-r--r-- | src/lj_cconv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lj_cconv.c b/src/lj_cconv.c index e5abf3e9..642a4852 100644 --- a/src/lj_cconv.c +++ b/src/lj_cconv.c @@ -335,7 +335,8 @@ void lj_cconv_ct_ct(CTState *cts, CType *d, CType *s, case CCX(P, F): if (!(flags & CCF_CAST) || !(flags & CCF_FROMTV)) goto err_conv; - dinfo = CTINFO(CT_NUM, CTF_UNSIGNED); + /* The signed conversion is cheaper. x64 really has 47 bit pointers. */ + dinfo = CTINFO(CT_NUM, (LJ_64 && dsize == 8) ? 0 : CTF_UNSIGNED); goto conv_I_F; case CCX(P, P): |