From d0295074941816351c15fe3d4326b5e98364ff9c Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Wed, 5 Feb 2014 16:56:27 +0800 Subject: [PATCH] Fix negative long long to float conversion on ARM --- lib/armeabi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/armeabi.c b/lib/armeabi.c index 616b9b53..bf5e07a8 100644 --- a/lib/armeabi.c +++ b/lib/armeabi.c @@ -175,7 +175,7 @@ unsigned __aeabi_ ## name(unsigned long long v) \ double_unsigned_struct val; \ \ /* fraction in negative float is encoded in 1's complement */ \ - if (with_sign && (v & (1 << 63))) { \ + if (with_sign && (v & (1ULL << 63))) { \ sign = 1; \ v = ~v + 1; \ } \ @@ -216,7 +216,7 @@ unsigned __aeabi_ ## name(unsigned long long v) \ DEFINE__AEABI_XL2F(ul2f, 0) /* long long to float conversion */ -DEFINE__AEABI_XL2F(l2f, 0) +DEFINE__AEABI_XL2F(l2f, 1) /* long long to double conversion */ #define __AEABI_XL2D(name, with_sign) \