diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1994-06-14 17:36:25 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1994-06-14 17:36:25 -0400 |
commit | f98bb7d33fd1b44f3101f008d925ff4de5bc389c (patch) | |
tree | 6268e06ba1108ddf0a901a0af28fcf13bcb50382 /gcc | |
parent | ca8e02b0ff456e28a8880faf59accf87be842290 (diff) | |
download | gcc-f98bb7d33fd1b44f3101f008d925ff4de5bc389c.zip gcc-f98bb7d33fd1b44f3101f008d925ff4de5bc389c.tar.gz gcc-f98bb7d33fd1b44f3101f008d925ff4de5bc389c.tar.bz2 |
(find_reloads): Change secondary reloads of class
RELOAD_FOR_OPERAND_ADDRESS to RELOAD_FOR_OPADDR_ADDR.
From-SVN: r7461
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/reload.c | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/gcc/reload.c b/gcc/reload.c index 88fd648..7452b2a 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -3581,7 +3581,41 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p) || reload_when_needed[i] == RELOAD_FOR_OUTPUT_ADDRESS) && (operand_reloadnum[reload_opnum[i]] < 0 || reload_optional[operand_reloadnum[reload_opnum[i]]])) - reload_when_needed[i] = RELOAD_FOR_OPERAND_ADDRESS; + { + /* If we have a secondary reload to go along with this reload, + change its type to RELOAD_FOR_OPADDR_ADDR. */ + + if (reload_when_needed[i] == RELOAD_FOR_INPUT_ADDRESS + && reload_secondary_in_reload[i] != -1) + { + int secondary_in_reload = reload_secondary_in_reload[i]; + + reload_when_needed[secondary_in_reload] = + RELOAD_FOR_OPADDR_ADDR; + + /* If there's a tertiary reload we have to change it also. */ + if (secondary_in_reload > 0 + && reload_secondary_in_reload[secondary_in_reload] != -1) + reload_when_needed[reload_secondary_in_reload[secondary_in_reload]] + = RELOAD_FOR_OPADDR_ADDR; + } + + if (reload_when_needed[i] == RELOAD_FOR_OUTPUT_ADDRESS + && reload_secondary_out_reload[i] != -1) + { + int secondary_out_reload = reload_secondary_out_reload[i]; + + reload_when_needed[secondary_out_reload] = + RELOAD_FOR_OPADDR_ADDR; + + /* If there's a tertiary reload we have to change it also. */ + if (secondary_out_reload + && reload_secondary_out_reload[secondary_out_reload] != -1) + reload_when_needed[reload_secondary_out_reload[secondary_out_reload]] + = RELOAD_FOR_OPADDR_ADDR; + } + reload_when_needed[i] = RELOAD_FOR_OPERAND_ADDRESS; + } if (reload_when_needed[i] == RELOAD_FOR_INPUT_ADDRESS && operand_reloadnum[reload_opnum[i]] >= 0 |