This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] tc-arm.c: Append ULL to 0xFFFFFFFFFFFFF to avoid errors on 32-bit hosts.
- From: Hans-Peter Nilsson <hp at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 8 Aug 2015 20:45:09 -0000
- Subject: [binutils-gdb] tc-arm.c: Append ULL to 0xFFFFFFFFFFFFF to avoid errors on 32-bit hosts.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8fe3f3d6afbf084f9ef36d887b661792c769f862
commit 8fe3f3d6afbf084f9ef36d887b661792c769f862
Author: Hans-Peter Nilsson <hp@bitrange.com>
Date: Sat Aug 8 22:44:37 2015 +0200
tc-arm.c: Append ULL to 0xFFFFFFFFFFFFF to avoid errors on 32-bit hosts.
Diff:
---
gas/ChangeLog | 5 +++++
gas/config/tc-arm.c | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/gas/ChangeLog b/gas/ChangeLog
index cdb1f5d..79de86a 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2015-08-08 Hans-Peter Nilsson <hp@axis.com>
+
+ * tc-arm.c (double_to_single, is_double_a_single): Append ULL to
+ 0xFFFFFFFFFFFFF to avoid errors on 32-bit hosts.
+
2015-08-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
* doc/c-aarch64.texi (.xword): Document directive.
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 7b3b5c9..899bfa2 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -7760,7 +7760,7 @@ static bfd_boolean
is_double_a_single (bfd_int64_t v)
{
int exp = (int)((v >> 52) & 0x7FF);
- bfd_int64_t mantissa = (v & (bfd_int64_t)0xFFFFFFFFFFFFF);
+ bfd_int64_t mantissa = (v & (bfd_int64_t)0xFFFFFFFFFFFFFULL);
return (exp == 0 || exp == 0x7FF
|| (exp >= 1023 - 126 && exp <= 1023 + 127))
@@ -7775,7 +7775,7 @@ double_to_single (bfd_int64_t v)
{
int sign = (int) ((v >> 63) & 1l);
int exp = (int) ((v >> 52) & 0x7FF);
- bfd_int64_t mantissa = (v & (bfd_int64_t)0xFFFFFFFFFFFFF);
+ bfd_int64_t mantissa = (v & (bfd_int64_t)0xFFFFFFFFFFFFFULL);
if (exp == 0x7FF)
exp = 0xFF;