]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR inline-asm/6162 (i386 asm reloader ice in reload_cse_simplify_operands)
authorIan Lance Taylor <ian@wasabisystems.com>
Fri, 5 Mar 2004 17:09:34 +0000 (17:09 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Fri, 5 Mar 2004 17:09:34 +0000 (17:09 +0000)
PR inline-asm/6162
* reload.c (find_reloads): Only support one pair of commutative
operands.

From-SVN: r78976

gcc/ChangeLog
gcc/reload.c

index 45a72b864047365e4d7505e15d9dc20dc19b474c..aeade98f3978a264feb38c422d2078dae3aa8bf5 100644 (file)
@@ -1,3 +1,9 @@
+2004-03-05  Ian Lance Taylor  <ian@wasabisystems.com>
+
+       PR inline-asm/6162
+       * reload.c (find_reloads): Only support one pair of commutative
+       operands.
+
 2004-03-02  Richard Henderson  <rth@redhat.com>
 
         PR middle-end/11767
index dc65f94dcdba3e95cbda8ad2d528dabd9edf3bd7..285ddf0b5b6ec144115b10d8e2640e157d8f9846 100644 (file)
@@ -1,6 +1,6 @@
 /* Search an insn for pseudo regs that must be in hard regs and are not.
    Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+   1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -2661,7 +2661,15 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
              if (i == noperands - 1)
                abort ();
 
-             commutative = i;
+             /* We currently only support one commutative pair of
+                operands.  Some existing asm code currently uses more
+                than one pair.  Previously, that would usually work,
+                but sometimes it would crash the compiler.  We
+                continue supporting that case as well as we can by
+                silently ignoring all but the first pair.  In the
+                future we may handle it correctly.  */
+             if (commutative < 0)
+               commutative = i;
            }
          else if (ISDIGIT (c))
            {
@@ -3025,9 +3033,8 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
                break;
 
              case '%':
-               /* The last operand should not be marked commutative.  */
-               if (i != noperands - 1)
-                 commutative = i;
+               /* We only support one commutative marker, the first
+                  one.  We already set commutative above.  */
                break;
 
              case '?':