This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] rs6000: Fix signed integer overflows
- From: Markus Trippelsdorf <markus at trippelsdorf dot de>
- To: David Edelsohn <dje dot gcc at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 19 Nov 2014 17:39:21 +0100
- Subject: Re: [PATCH] rs6000: Fix signed integer overflows
- Authentication-results: sourceware.org; auth=none
- References: <20141119152425 dot GG344 at x4> <CAGWvnykXF7CzuO2S-yydyA=f+3VgT4-JyDOATeZVDYX6Ev-BNw at mail dot gmail dot com>
On 2014.11.19 at 11:20 -0500, David Edelsohn wrote:
> On Wed, Nov 19, 2014 at 10:24 AM, Markus Trippelsdorf
> <markus@trippelsdorf.de> wrote:
> > bootstrap-ubsan on gcc112 shows a couple of signed integer overflows:
>
> > The fix was tested on powerpc64-unknown-linux-gnu.
> > OK for trunk?
> >
> > Thank you.
> >
> > 2014-11-19 Markus Trippelsdorf <markus@trippelsdorf.de>
> >
> > * config/rs6000/constraints.md: Avoid signed integer overflows.
> > * config/rs6000/predicates.md: Likewise.
>
> This is okay. IN_RANGE is clearer, but you don't have to clean up comparison.
>
> UINTVAL is prettier, but not necessary. A lot of code in GCC is not
> careful about that.
Thanks for all the comments. I've checked in the original patch, but feel free
to follow up with aesthetic improvements.
--
Markus