In GNU as, avoid left-shifting negative integers, which is undefined.

MFC after:	3 days
This commit is contained in:
Dimitry Andric 2015-08-09 11:06:40 +00:00
parent ff7b06db23
commit a0c1575d2f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=286519

View File

@ -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() */