summaryrefslogtreecommitdiff
path: root/src/lj_obj.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_obj.h')
-rw-r--r--src/lj_obj.h8
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)
786 786
787/* -- Number to integer conversion ---------------------------------------- */ 787/* -- Number to integer conversion ---------------------------------------- */
788 788
789#if !LJ_ARCH_HASFPU 789#if LJ_SOFTFP
790LJ_ASMF int32_t lj_vm_tobit(double x); 790LJ_ASMF int32_t lj_vm_tobit(double x);
791#endif 791#endif
792 792
793static LJ_AINLINE int32_t lj_num2bit(lua_Number n) 793static LJ_AINLINE int32_t lj_num2bit(lua_Number n)
794{ 794{
795#if LJ_ARCH_HASFPU 795#if LJ_SOFTFP
796 return lj_vm_tobit(n);
797#else
796 TValue o; 798 TValue o;
797 o.n = n + 6755399441055744.0; /* 2^52 + 2^51 */ 799 o.n = n + 6755399441055744.0; /* 2^52 + 2^51 */
798 return (int32_t)o.u32.lo; 800 return (int32_t)o.u32.lo;
799#else
800 return lj_vm_tobit(n);
801#endif 801#endif
802} 802}
803 803