diff options
author | Mike Pall <mike> | 2011-05-16 02:38:07 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2011-05-16 02:38:07 +0200 |
commit | 1ac71f1fa8c0ad0c691ca7a2a96d74121b75ec9e (patch) | |
tree | d8e690b8533d11caa287daab113f22738347a7e4 /src/lj_obj.h | |
parent | be73a96751261bb3a424aa1c5d28547f23037733 (diff) | |
download | luajit2-1ac71f1fa8c0ad0c691ca7a2a96d74121b75ec9e.tar.gz |
ARM: Add LJ_SOFTFP define. Add support for soft-float slot handling.
Diffstat (limited to 'src/lj_obj.h')
-rw-r--r-- | src/lj_obj.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lj_obj.h b/src/lj_obj.h index c1bdb844..6d6782b4 100644 --- a/src/lj_obj.h +++ b/src/lj_obj.h @@ -786,18 +786,18 @@ static LJ_AINLINE void copyTV(lua_State *L, TValue *o1, const TValue *o2) /* -- Number to integer conversion ---------------------------------------- */ -#if !LJ_ARCH_HASFPU +#if LJ_SOFTFP LJ_ASMF int32_t lj_vm_tobit(double x); #endif static LJ_AINLINE int32_t lj_num2bit(lua_Number n) { -#if LJ_ARCH_HASFPU +#if LJ_SOFTFP + return lj_vm_tobit(n); +#else TValue o; o.n = n + 6755399441055744.0; /* 2^52 + 2^51 */ return (int32_t)o.u32.lo; -#else - return lj_vm_tobit(n); #endif } |