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: Marek Polacek <polacek at redhat dot com>
- To: Markus Trippelsdorf <markus at trippelsdorf dot de>
- Cc: gcc-patches at gcc dot gnu dot org, David Edelsohn <dje dot gcc at gmail dot com>
- Date: Wed, 19 Nov 2014 16:41:49 +0100
- Subject: Re: [PATCH] rs6000: Fix signed integer overflows
- Authentication-results: sourceware.org; auth=none
- References: <20141119152425 dot GG344 at x4>
On Wed, Nov 19, 2014 at 04:24:25PM +0100, Markus Trippelsdorf wrote:
> ;; Return 1 if op is a constant integer valid for addition
> @@ -827,7 +827,7 @@
> (define_predicate "mask_operand"
> (match_code "const_int")
> {
> - HOST_WIDE_INT c, lsb;
> + unsigned HOST_WIDE_INT c, lsb;
>
> c = INTVAL (op);
>
> @@ -872,7 +872,7 @@
> (define_predicate "mask_operand_wrap"
> (match_code "const_int")
> {
> - HOST_WIDE_INT c, lsb;
> + unsigned HOST_WIDE_INT c, lsb;
>
> c = INTVAL (op);
>
> @@ -897,7 +897,7 @@
> (define_predicate "mask64_operand"
> (match_code "const_int")
> {
> - HOST_WIDE_INT c, lsb;
> + unsigned HOST_WIDE_INT c, lsb;
>
> c = INTVAL (op);
>
> @@ -923,7 +923,7 @@
> (define_predicate "mask64_2_operand"
> (match_code "const_int")
> {
> - HOST_WIDE_INT c, lsb;
> + unsigned HOST_WIDE_INT c, lsb;
>
> c = INTVAL (op);
Shouldn't you use UINTVAL then?
Marek