Fix negative long long to float conversion on ARM

master
Thomas Preud'homme 2014-02-05 16:56:27 +08:00
parent 0ab07f39a6
commit d029507494
1 changed files with 2 additions and 2 deletions

View File

@ -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) \