- Add missing mask_operand patch.
authorAlan Modra <amodra@bigpond.net.au>
Sat, 23 Feb 2002 02:11:07 +0000 (02:11 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Sat, 23 Feb 2002 02:11:07 +0000 (21:11 -0500)
From-SVN: r49984

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index 218f8116e83eb326d33ff91a604b60c279341c14..4be4f46c43a7c0557ae807b0ac12411113f59f8c 100644 (file)
@@ -9,6 +9,7 @@
        Simplify comparison of `low'.
        (add_operand): Fix formatting.
        (non_add_cint_operand): Use CONST_OK_FOR_LETTER_P.
+       (mask_operand): Disallow mask to wrap in 64-bit mode.
        (rs6000_stack_info): Remove redundant test setting push_p.
        (output_toc): Fix formatting.
        * config/rs6000/rs6000.md (boolsi3, boolcsi3 splitters): Use
index 863126ef72f46b0b293c7961f66eb24df1f9257e..70adbf86cb431b102a24eb7c5f9f83cb21a32ea6 100644 (file)
@@ -1399,6 +1399,11 @@ mask_operand (op, mode)
 
   c = INTVAL (op);
 
+  /* Fail in 64-bit mode if the mask wraps around because the upper
+     32-bits of the mask will all be 1s, contrary to GCC's internal view.  */
+  if (TARGET_POWERPC64 && (c & 0x80000001) == 0x80000001)
+    return 0;
+
   /* We don't change the number of transitions by inverting,
      so make sure we start with the LS bit zero.  */
   if (c & 1)