OSDN Git Service

* config/sh/sh.c (gen_shl_and): Revert previous patch.
authordrow <drow@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 19 Nov 2002 18:27:01 +0000 (18:27 +0000)
committerdrow <drow@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 19 Nov 2002 18:27:01 +0000 (18:27 +0000)
        * config/sh/sh.md (ashrdi3+1, ashrdi3+2): Predicate on
        reload_completed.

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

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

index a4f11ed..31e3bbb 100644 (file)
@@ -1,3 +1,9 @@
+2002-11-19  Daniel Jacobowitz  <drow@mvista.com>
+
+       * config/sh/sh.c (gen_shl_and): Revert previous patch.
+       * config/sh/sh.md (ashrdi3+1, ashrdi3+2): Predicate on
+       reload_completed.
+
 2002-11-19  Kazu Hirata  <kazu@cs.umass.edu>
 
        * config/h8300/h8300.c (print_operand): Update the use of
index 7ea35dc..70cb0c1 100644 (file)
@@ -1823,16 +1823,11 @@ gen_shl_and (dest, left_rtx, mask_rtx, source)
 
        if (first < 0)
          {
-           enum machine_mode mode
-             = ((mask << right) <= 0xff) ? QImode : HImode;
-           rtx lowpart = gen_lowpart (mode, source);
-
-           if (no_new_pseudos && ! TARGET_SHMEDIA
-               && ! arith_reg_operand (lowpart, mode))
-             return -1;
            emit_insn ((mask << right) <= 0xff
-                      ? gen_zero_extendqisi2(dest, lowpart)
-                      : gen_zero_extendhisi2(dest, lowpart));
+                      ? gen_zero_extendqisi2(dest,
+                                             gen_lowpart (QImode, source))
+                      : gen_zero_extendhisi2(dest,
+                                             gen_lowpart (HImode, source)));
            source = dest;
          }
        if (source != dest)
@@ -1851,18 +1846,9 @@ gen_shl_and (dest, left_rtx, mask_rtx, source)
            mask <<= first;
          }
        if (first >= 0)
-         {
-           enum machine_mode mode = (mask <= 0xff) ? QImode : HImode;
-           rtx lowpart = gen_lowpart (mode, dest);
-
-           if (no_new_pseudos && ! TARGET_SHMEDIA
-               && ! arith_reg_operand (lowpart, mode))
-             return -1;
-           emit_insn (mask <= 0xff
-                      ? gen_zero_extendqisi2(dest, lowpart)
-                      : gen_zero_extendhisi2(dest, lowpart));
-         }
-       
+         emit_insn (mask <= 0xff
+                    ? gen_zero_extendqisi2(dest, gen_lowpart (QImode, dest))
+                    : gen_zero_extendhisi2(dest, gen_lowpart (HImode, dest)));
        if (total_shift > 0)
          {
            operands[2] = GEN_INT (total_shift);
index d57583b..ed14fbd 100644 (file)
        (and:SI (ashift:SI (match_operand:SI 1 "register_operand" "")
                           (match_operand:SI 2 "const_int_operand" ""))
                (match_operand:SI 3 "const_int_operand" "")))]
-  "TARGET_SH1 && (unsigned)INTVAL (operands[2]) < 32"
+  "TARGET_SH1 && reload_completed && (unsigned)INTVAL (operands[2]) < 32"
   [(use (reg:SI R0_REG))]
   "if (gen_shl_and (operands[0], operands[2], operands[3], operands[1])) FAIL;
    DONE;")
                           (match_operand:SI 2 "const_int_operand" ""))
                (match_operand:SI 3 "const_int_operand" "")))
    (clobber (reg:SI T_REG))]
-  "TARGET_SH1 && (unsigned)INTVAL (operands[2]) < 32"
+  "TARGET_SH1 && reload_completed && (unsigned)INTVAL (operands[2]) < 32"
   [(use (reg:SI R0_REG))]
   "if (gen_shl_and (operands[0], operands[2], operands[3], operands[1])) FAIL;
    DONE;")