Patchwork fixed rot on the wide-int branch.

login
register
mail settings
Submitter Kenneth Zadeck
Date Aug. 20, 2013, 2:34 p.m.
Message ID <52137E6F.7040509@naturalbridge.com>
Download mbox | patch
Permalink /patch/268561/
State New
Headers show

Comments

Kenneth Zadeck - Aug. 20, 2013, 2:34 p.m.

Patch

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;