svn commit: r286519 - head/contrib/binutils/gas/config
Warner Losh
imp at bsdimp.com
Sun Aug 9 15:59:58 UTC 2015
Since when is LEFT shifting a signed number undefined. It is RIGHT
shifting that’s undefined…
Warner
> On Aug 9, 2015, at 5:06 AM, Dimitry Andric <dim at FreeBSD.org> wrote:
>
> Author: dim
> Date: Sun Aug 9 11:06:40 2015
> New Revision: 286519
> URL: https://svnweb.freebsd.org/changeset/base/286519
>
> Log:
> In GNU as, avoid left-shifting negative integers, which is undefined.
>
> MFC after: 3 days
>
> Modified:
> head/contrib/binutils/gas/config/tc-i386.c
>
> Modified: head/contrib/binutils/gas/config/tc-i386.c
> ==============================================================================
> --- head/contrib/binutils/gas/config/tc-i386.c Sun Aug 9 10:36:25 2015 (r286518)
> +++ head/contrib/binutils/gas/config/tc-i386.c Sun Aug 9 11:06:40 2015 (r286519)
> @@ -914,8 +914,8 @@ fits_in_signed_long (offsetT num ATTRIBU
> #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() */
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20150809/415fd27c/attachment.bin>
More information about the svn-src-all
mailing list