Date: Sun, 9 Aug 2015 09:59:49 -0600 From: Warner Losh <imp@bsdimp.com> To: Dimitry Andric <dim@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r286519 - head/contrib/binutils/gas/config Message-ID: <FE48F62E-79C9-48D6-B2EA-21544EC19C45@bsdimp.com> In-Reply-To: <201508091106.t79B6fGN078307@repo.freebsd.org> References: <201508091106.t79B6fGN078307@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_B63C258E-B2F2-4F1E-B2F0-726E7BBE828F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Since when is LEFT shifting a signed number undefined. It is RIGHT shifting that=E2=80=99s undefined=E2=80=A6 Warner > On Aug 9, 2015, at 5:06 AM, Dimitry Andric <dim@FreeBSD.org> wrote: >=20 > Author: dim > Date: Sun Aug 9 11:06:40 2015 > New Revision: 286519 > URL: https://svnweb.freebsd.org/changeset/base/286519 >=20 > Log: > In GNU as, avoid left-shifting negative integers, which is undefined. >=20 > MFC after: 3 days >=20 > Modified: > head/contrib/binutils/gas/config/tc-i386.c >=20 > Modified: head/contrib/binutils/gas/config/tc-i386.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- 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) =3D=3D ((offsetT) -1 << 31)); > + return (!(-((offsetT) 1 << 31) & num) > + || (-((offsetT) 1 << 31) & num) =3D=3D -((offsetT) 1 << 31)); > #endif > } /* fits_in_signed_long() */ >=20 >=20 --Apple-Mail=_B63C258E-B2F2-4F1E-B2F0-726E7BBE828F Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJVx3j2AAoJEGwc0Sh9sBEAbmwQAJEasQpFomXfXNppBe140ID/ yUG26/ITDXaM/EtJwQNwmeN1BYvDw0WLk/q452UF4Ov+FRWoDiMC0kv+Ngu+o37E mHsbSuGyzMnG6Jbch6h0g4sLzidIKN7Ept4JzdKkEsV24EKs6C7XHNkERFEMhqcp h4nd5wg09O6AacIu8nPP0AAwloZZLxNpE32qvxdiPRsOiY7xd4LIHTrdYpN0CrM4 5JS2yNpUlaJCWX8U/xzdtAoBZOe5KfuQhZAgFbcY3QtlSapPoOliVzpvNHbCCoa+ jCPL2sLXnZTqEjgLspPoKmqrG0eohHDfjaI8b6m+d00AJTtlJagxnT2Lm9KN3ARB 33KDUGyBIypR8EJdW5a5dbQIdgpwrIrBx3GSe70OeQWEa6OB1fQprT3TSb3Zmxd0 VRS7T++7+KCEm9VzfaX49rSA+gRgSxPFGbqotowBoF1iKI6kxtRkwgEJHO5WMfln 0djAgdYecSuzUvrWPmBPntSv5+vAvh97h5bXEAgvgpfDwr4VW/L43/FWOyLUMVsE 43mvuoiYNWeOTMxBRwitIZBc1Ax0JCjw6hggsrpMbhCL6h6qluBT3r9bvzCpl2G5 QjM8j5cuWMlzk3KfyCdkdfB77yPSrjKcPt5skhIAlimwmfEQ5EqDJcXHDPZoFZDE quHhoYYDVnyIhSSUPKjC =dzOF -----END PGP SIGNATURE----- --Apple-Mail=_B63C258E-B2F2-4F1E-B2F0-726E7BBE828F--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?FE48F62E-79C9-48D6-B2EA-21544EC19C45>