From 3ab328cd1c4acb10f53d39b000d9960bd7df4680 Mon Sep 17 00:00:00 2001 From: dim Date: Wed, 12 Aug 2015 19:18:54 +0000 Subject: MFC r286519: In GNU as, avoid left-shifting negative integers, which is undefined. --- contrib/binutils/gas/config/tc-i386.c | 4 ++-- 1 file 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() */ -- cgit v1.1