summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-08-12 19:18:54 +0000
committerdim <dim@FreeBSD.org>2015-08-12 19:18:54 +0000
commit3ab328cd1c4acb10f53d39b000d9960bd7df4680 (patch)
tree1749f23f824b62056c207a5e313e8c870e688fb7
parent28229b8a83d2ab03206ccdcabf6431c8f5e02270 (diff)
downloadFreeBSD-src-3ab328cd1c4acb10f53d39b000d9960bd7df4680.zip
FreeBSD-src-3ab328cd1c4acb10f53d39b000d9960bd7df4680.tar.gz
MFC r286519:
In GNU as, avoid left-shifting negative integers, which is undefined.
-rw-r--r--contrib/binutils/gas/config/tc-i386.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/binutils/gas/config/tc-i386.c b/contrib/binutils/gas/config/tc-i386.c
index 5c8e6b1..2029c87 100644
--- a/contrib/binutils/gas/config/tc-i386.c
+++ b/contrib/binutils/gas/config/tc-i386.c
@@ -914,8 +914,8 @@ fits_in_signed_long (offsetT num ATTRIBUTE_UNUSED)
#ifndef BFD64
return 1;
#else
- return (!(((offsetT) -1 << 31) & num)
- || (((offsetT) -1 << 31) & num) == ((offsetT) -1 << 31));
+ return (!(-((offsetT) 1 << 31) & num)
+ || (-((offsetT) 1 << 31) & num) == -((offsetT) 1 << 31));
#endif
} /* fits_in_signed_long() */
OpenPOWER on IntegriCloud