* reload1.c (merge_assigned_reloads): Do not change any
authordrow <drow@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 30 Sep 2005 18:09:56 +0000 (18:09 +0000)
committerdrow <drow@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 30 Sep 2005 18:09:56 +0000 (18:09 +0000)
RELOAD_FOR_OUTPUT_ADDRESS reloads.

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

gcc/ChangeLog
gcc/reload1.c

index 00107da..e6fc8a8 100644 (file)
@@ -1,3 +1,8 @@
+2005-09-30  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * reload1.c (merge_assigned_reloads): Do not change any
+       RELOAD_FOR_OUTPUT_ADDRESS reloads.
+
 2005-09-30  Geoffrey Keating  <geoffk@apple.com>
 
        * config/t-slibgcc-darwin (libgcc_s_%.dylib): Remove old symlinks
index 33840b5..d8eeb2a 100644 (file)
@@ -6083,6 +6083,8 @@ merge_assigned_reloads (rtx insn)
       if (j == n_reloads
          && max_input_address_opnum <= min_conflicting_input_opnum)
        {
+         gcc_assert (rld[i].when_needed != RELOAD_FOR_OUTPUT);
+
          for (j = 0; j < n_reloads; j++)
            if (i != j && rld[j].reg_rtx != 0
                && rtx_equal_p (rld[i].reg_rtx, rld[j].reg_rtx)
@@ -6101,16 +6103,17 @@ merge_assigned_reloads (rtx insn)
             if they were for inputs, RELOAD_OTHER for outputs.  Note that
             this test is equivalent to looking for reloads for this operand
             number.  */
-         /* We must take special care when there are two or more reloads to
-            be merged and a RELOAD_FOR_OUTPUT_ADDRESS reload that loads the
-            same value or a part of it; we must not change its type if there
-            is a conflicting input.  */
+         /* We must take special care with RELOAD_FOR_OUTPUT_ADDRESS; it may
+            share registers with a RELOAD_FOR_INPUT, so we can not change it
+            to RELOAD_FOR_OTHER_ADDRESS.  We should never need to, since we
+            do not modify RELOAD_FOR_OUTPUT.  */
 
          if (rld[i].when_needed == RELOAD_OTHER)
            for (j = 0; j < n_reloads; j++)
              if (rld[j].in != 0
                  && rld[j].when_needed != RELOAD_OTHER
                  && rld[j].when_needed != RELOAD_FOR_OTHER_ADDRESS
+                 && rld[j].when_needed != RELOAD_FOR_OUTPUT_ADDRESS
                  && (! conflicting_input
                      || rld[j].when_needed == RELOAD_FOR_INPUT_ADDRESS
                      || rld[j].when_needed == RELOAD_FOR_INPADDR_ADDRESS)