From: Richard Kenner Date: Tue, 14 Jun 1994 21:36:25 +0000 (-0400) Subject: (find_reloads): Change secondary reloads of class X-Git-Tag: misc/cutover-egcs-0~6482 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f98bb7d33fd1b44f3101f008d925ff4de5bc389c;p=thirdparty%2Fgcc.git (find_reloads): Change secondary reloads of class RELOAD_FOR_OPERAND_ADDRESS to RELOAD_FOR_OPADDR_ADDR. From-SVN: r7461 --- diff --git a/gcc/reload.c b/gcc/reload.c index 88fd64855e60..7452b2a56ab6 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