diff options
| author | Thomas Preud'homme <robotux@celest.fr> | 2014-02-05 16:56:27 +0800 |
|---|---|---|
| committer | Thomas Preud'homme <robotux@celest.fr> | 2014-02-05 16:56:27 +0800 |
| commit | d0295074941816351c15fe3d4326b5e98364ff9c (patch) | |
| tree | d8b8e50f45469f6180d58bfb9ad9d33673ec332e | |
| parent | 0ab07f39a63e1c183126a6b79db96819907e26dd (diff) | |
| download | tinycc-d0295074941816351c15fe3d4326b5e98364ff9c.tar.gz tinycc-d0295074941816351c15fe3d4326b5e98364ff9c.tar.bz2 | |
Fix negative long long to float conversion on ARM
| -rw-r--r-- | lib/armeabi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/armeabi.c b/lib/armeabi.c index 616b9b5..bf5e07a 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) \ |
