reload1.c (reload_reg_free_before_p): RELOAD_FOR_OUTADDR_ADDRESS is earlier than...
authorJ"orn Rennecke <amylaar@cygnus.co.uk>
Tue, 16 Jun 1998 15:35:50 +0000 (15:35 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Tue, 16 Jun 1998 15:35:50 +0000 (16:35 +0100)
* reload1.c (reload_reg_free_before_p): RELOAD_FOR_OUTADDR_ADDRESS
is earlier than RELOAD_FOR_OUTPUT_ADDRESS; RELOAD_FOR_INPADDR_ADDRESS
is earlier than RELOAD_FOR_INPUT_ADDRESS.

From-SVN: r20526

gcc/ChangeLog
gcc/reload1.c

index 22f3e27540d84fb2d18d8a3189888bc131693767..e8f24726103a06a5beffac1b52d534911dfc3f63 100644 (file)
@@ -1,3 +1,9 @@
+Tue Jun 16 23:33:24 1998  J"orn Rennecke <amylaar@cygnus.co.uk>
+
+       * reload1.c (reload_reg_free_before_p): RELOAD_FOR_OUTADDR_ADDRESS
+       is earlier than RELOAD_FOR_OUTPUT_ADDRESS; RELOAD_FOR_INPADDR_ADDRESS
+       is earlier than RELOAD_FOR_INPUT_ADDRESS.
+
 Tue Jun 16 13:15:16 1998  Jim Wilson  <wilson@cygnus.com>
 
        * libgcc1-test.c (memcpy): Define.
index 23ad43933e9b60ca775e29ad3b8e3293ef767787..b1e26ae1e4e4ba04dac48110d13a466f94f7b53e 100644 (file)
@@ -4658,6 +4658,10 @@ reload_reg_free_before_p (regno, opnum, type)
         the first place, since we know that it was allocated.  */
 
     case RELOAD_FOR_OUTPUT_ADDRESS:
+      /* Earlier reloads include RELOAD_FOR_INPADDR_ADDRESS reloads.  */
+      if (TEST_HARD_REG_BIT (reload_reg_used_in_outaddr_addr[opnum], regno))
+       return 0;
+      /* ... fall through ...  */
     case RELOAD_FOR_OUTADDR_ADDRESS:
       /* Earlier reloads are for earlier outputs or their addresses,
         any RELOAD_FOR_INSN reloads, any inputs or their addresses, or any
@@ -4738,6 +4742,10 @@ reload_reg_free_before_p (regno, opnum, type)
       return ! TEST_HARD_REG_BIT (reload_reg_used_in_other_addr, regno);
 
     case RELOAD_FOR_INPUT_ADDRESS:
+      /* Earlier reloads include RELOAD_FOR_INPADDR_ADDRESS reloads.  */
+      if (TEST_HARD_REG_BIT (reload_reg_used_in_inpaddr_addr[opnum], regno))
+       return 0;
+      /* ... fall through ...  */
     case RELOAD_FOR_INPADDR_ADDRESS:
       /* Similarly, all we have to check is for use in earlier inputs'
         addresses.  */