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]

fixed rot on the wide-int branch.


Index: gcc/optabs.c
===================================================================
--- gcc/optabs.c    (revision 201884)
+++ gcc/optabs.c    (working copy)
@@ -867,7 +867,8 @@ expand_subword_shift (enum machine_mode
                   outof_input, const1_rtx, 0, unsignedp, methods);
       if (shift_mask == BITS_PER_WORD - 1)
     {
- tmp = immed_wide_int_const (wide_int::minus_one (op1_mode), op1_mode);
+      tmp = immed_wide_int_const
+        (wide_int::minus_one (GET_MODE_PRECISION (op1_mode)), op1_mode);
       tmp = simplify_expand_binop (op1_mode, xor_optab, op1, tmp,
                        0, true, methods);
     }
Index: gcc/recog.c
===================================================================
--- gcc/recog.c    (revision 201884)
+++ gcc/recog.c    (working copy)
@@ -1187,8 +1187,7 @@ const_scalar_int_operand (rtx op, enum m
       /* Multiword partial int.  */
       HOST_WIDE_INT x
         = CONST_WIDE_INT_ELT (op, CONST_WIDE_INT_NUNITS (op) - 1);
-      return (wide_int::sext (x, prec & (HOST_BITS_PER_WIDE_INT - 1))
-          == x);
+      return (sext_hwi (x, prec & (HOST_BITS_PER_WIDE_INT - 1)) == x);
     }
     }
   return 1;


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