This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] rs6000: Fix signed integer overflows


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]