mirror of
https://github.com/mirror/tinycc.git
synced 2025-01-15 05:20:06 +08:00
Fix negative long long to float conversion on ARM
This commit is contained in:
parent
0ab07f39a6
commit
d029507494
@ -175,7 +175,7 @@ unsigned __aeabi_ ## name(unsigned long long v) \
|
|||||||
double_unsigned_struct val; \
|
double_unsigned_struct val; \
|
||||||
\
|
\
|
||||||
/* fraction in negative float is encoded in 1's complement */ \
|
/* fraction in negative float is encoded in 1's complement */ \
|
||||||
if (with_sign && (v & (1 << 63))) { \
|
if (with_sign && (v & (1ULL << 63))) { \
|
||||||
sign = 1; \
|
sign = 1; \
|
||||||
v = ~v + 1; \
|
v = ~v + 1; \
|
||||||
} \
|
} \
|
||||||
@ -216,7 +216,7 @@ unsigned __aeabi_ ## name(unsigned long long v) \
|
|||||||
DEFINE__AEABI_XL2F(ul2f, 0)
|
DEFINE__AEABI_XL2F(ul2f, 0)
|
||||||
|
|
||||||
/* long long to float conversion */
|
/* long long to float conversion */
|
||||||
DEFINE__AEABI_XL2F(l2f, 0)
|
DEFINE__AEABI_XL2F(l2f, 1)
|
||||||
|
|
||||||
/* long long to double conversion */
|
/* long long to double conversion */
|
||||||
#define __AEABI_XL2D(name, with_sign) \
|
#define __AEABI_XL2D(name, with_sign) \
|
||||||
|
Loading…
Reference in New Issue
Block a user