OSDN Git Service

* sh.c (gen_shl_and): Don't sign extend constant for kind two.
authoramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 15 May 1998 03:26:52 +0000 (03:26 +0000)
committeramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 15 May 1998 03:26:52 +0000 (03:26 +0000)
Abort if trying to split kind 3 or 4 outside of combine.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19772 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/sh/sh.c

index 0f06f62..f3c35da 100644 (file)
@@ -1,3 +1,8 @@
+Fri May 15 11:21:16 1998  J"orn Rennecke <amylaar@cygnus.co.uk>
+
+       * sh.c (gen_shl_and): Don't sign extend constant for kind two.
+       Abort if trying to split kind 3 or 4 outside of combine.
+
 Fri May 15 01:47:37 1998  Jeffrey A Law  (law@cygnus.com)
 
        * mips.c (print_operand, case 'x'): Use HOST_WIDE_INT_PRINT_HEX.
index f9a3caa..ac30a66 100644 (file)
@@ -1335,13 +1335,13 @@ gen_shl_and (dest, left_rtx, mask_rtx, source)
       }
     case 4:
       shift_gen_fun = gen_shifty_op;
-    case 2:
     case 3:
       /* If the topmost bit that matters is set, set the topmost bits
         that don't matter.  This way, we might be able to get a shorter
         signed constant.  */
       if (mask & ((HOST_WIDE_INT)1 << 31 - total_shift))
        mask |= (HOST_WIDE_INT)~0 << (31 - total_shift);
+    case 2:
       /* Don't expand fine-grained when combining, because that will
          make the pattern fail.  */
       if (rtx_equal_function_value_matters
@@ -1349,6 +1349,10 @@ gen_shl_and (dest, left_rtx, mask_rtx, source)
        {
          rtx operands[3];
   
+         /* Cases 3 and 4 should be handled by this split
+            only while combining  */
+         if (kind > 2)
+           abort ();
          if (right)
            {
              emit_insn (gen_lshrsi3 (dest, source, GEN_INT (right)));