pa.c (pa_adjust_insn_length): Check that block move pattern is a set before looking...
authorAlan Modra <alan@linuxcare.com.au>
Sun, 18 Feb 2001 07:25:25 +0000 (07:25 +0000)
committerJeff Law <law@gcc.gnu.org>
Sun, 18 Feb 2001 07:25:25 +0000 (00:25 -0700)
2001-02-18  Alan Modra <alan@linuxcare.com.au>

        * config/pa/pa.c (pa_adjust_insn_length): Check that block move
        pattern is a set before looking at operands.

From-SVN: r39825

gcc/ChangeLog
gcc/config/pa/pa.c

index 8b52a3d4259f458621ad2ede016d7bca685ec0d1..aab26f60784081f3afb761b00050015fd30d1959 100644 (file)
@@ -1,3 +1,8 @@
+2001-02-18  Alan Modra <alan@linuxcare.com.au>
+
+       * pa.c (pa_adjust_insn_length): Check that block move
+       pattern is a set before looking at operands.
+
 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
 
        * fold-const.c (fold_binary_op_with_conditional_arg): New
index a7a0b9ec002cfeb9ab711d135057413c7a82a67f..07c0ad60fbe644c7d4afd74c4c2782848cd4e474 100644 (file)
@@ -382,8 +382,9 @@ move_operand (op, mode)
   if (GET_CODE (op) == LO_SUM
       && GET_CODE (XEXP (op, 0)) == REG
       && REG_OK_FOR_BASE_P (XEXP (op, 0))
-      && GET_CODE (XEXP (op, 1)) == UNSPEC)
-    return 0;
+      && GET_CODE (XEXP (op, 1)) == UNSPEC
+      && GET_MODE (op) == Pmode)
+    return 1;
 
   /* Since move_operand is only used for source operands, we can always
      allow scaled indexing!  */
@@ -3816,6 +3817,7 @@ pa_adjust_insn_length (insn, length)
   /* Block move pattern.  */
   else if (GET_CODE (insn) == INSN
           && GET_CODE (pat) == PARALLEL
+          && GET_CODE (XVECEXP (pat, 0, 0)) == SET
           && GET_CODE (XEXP (XVECEXP (pat, 0, 0), 0)) == MEM
           && GET_CODE (XEXP (XVECEXP (pat, 0, 0), 1)) == MEM
           && GET_MODE (XEXP (XVECEXP (pat, 0, 0), 0)) == BLKmode