From: Uros Bizjak Date: Fri, 17 Apr 2015 17:59:24 +0000 (+0200) Subject: i386.h (LEGITIMIZE_RELOAD_ADDRESS): Remove. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fdce7c12f37a334c1af1ee86b7f7755cf98a5bca;p=gcc.git i386.h (LEGITIMIZE_RELOAD_ADDRESS): Remove. * config/i386/i386.h (LEGITIMIZE_RELOAD_ADDRESS): Remove. * config/i386/i386.c (ix86_legitimize_reload_address): Ditto. * config/i386/i386-protos.h (ix86_legitimize_reload_address): Ditto. From-SVN: r222193 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e6501e39a9b..4fbb70bc074 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-04-17 Uros Bizjak + + * config/i386/i386.h (LEGITIMIZE_RELOAD_ADDRESS): Remove. + * config/i386/i386.c (ix86_legitimize_reload_address): Ditto. + * config/i386/i386-protos.h (ix86_legitimize_reload_address): Ditto. + 2015-04-17 Andreas Tobler PR target/65535 diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h index 39624270638..2c90c2c5ccd 100644 --- a/gcc/config/i386/i386-protos.h +++ b/gcc/config/i386/i386-protos.h @@ -67,8 +67,6 @@ extern bool ix86_expand_set_or_movmem (rtx, rtx, rtx, rtx, rtx, rtx, extern bool constant_address_p (rtx); extern bool legitimate_pic_operand_p (rtx); extern bool legitimate_pic_address_disp_p (rtx); -extern bool ix86_legitimize_reload_address (rtx, machine_mode, - int, int, int); extern void print_reg (rtx, int, FILE*); extern void ix86_print_operand (FILE *, rtx, int); diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 72e6bc27f62..da6918624af 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -13320,62 +13320,6 @@ legitimate_pic_address_disp_p (rtx disp) return false; } -/* Our implementation of LEGITIMIZE_RELOAD_ADDRESS. Returns a value to - replace the input X, or the original X if no replacement is called for. - The output parameter *WIN is 1 if the calling macro should goto WIN, - 0 if it should not. */ - -bool -ix86_legitimize_reload_address (rtx x, machine_mode, int opnum, int type, - int) -{ - /* Reload can generate: - - (plus:DI (plus:DI (unspec:DI [(const_int 0 [0])] UNSPEC_TP) - (reg:DI 97)) - (reg:DI 2 cx)) - - This RTX is rejected from ix86_legitimate_address_p due to - non-strictness of base register 97. Following this rejection, - reload pushes all three components into separate registers, - creating invalid memory address RTX. - - Following code reloads only the invalid part of the - memory address RTX. */ - - if (GET_CODE (x) == PLUS - && REG_P (XEXP (x, 1)) - && GET_CODE (XEXP (x, 0)) == PLUS - && REG_P (XEXP (XEXP (x, 0), 1))) - { - rtx base, index; - bool something_reloaded = false; - - base = XEXP (XEXP (x, 0), 1); - if (!REG_OK_FOR_BASE_STRICT_P (base)) - { - push_reload (base, NULL_RTX, &XEXP (XEXP (x, 0), 1), NULL, - BASE_REG_CLASS, GET_MODE (x), VOIDmode, 0, 0, - opnum, (enum reload_type) type); - something_reloaded = true; - } - - index = XEXP (x, 1); - if (!REG_OK_FOR_INDEX_STRICT_P (index)) - { - push_reload (index, NULL_RTX, &XEXP (x, 1), NULL, - INDEX_REG_CLASS, GET_MODE (x), VOIDmode, 0, 0, - opnum, (enum reload_type) type); - something_reloaded = true; - } - - gcc_assert (something_reloaded); - return true; - } - - return false; -} - /* Determine if op is suitable RTX for an address register. Return naked register if a register or a register subreg is found, otherwise return NULL_RTX. */ diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 0dbe7b4561a..fa2e6c26a0c 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -1830,17 +1830,6 @@ typedef struct ix86_args { #define CONSTANT_ADDRESS_P(X) constant_address_p (X) -/* Try a machine-dependent way of reloading an illegitimate address - operand. If we find one, push the reload and jump to WIN. This - macro is used in only one place: `find_reloads_address' in reload.c. */ - -#define LEGITIMIZE_RELOAD_ADDRESS(X, MODE, OPNUM, TYPE, INDL, WIN) \ -do { \ - if (ix86_legitimize_reload_address ((X), (MODE), (OPNUM), \ - (int)(TYPE), (INDL))) \ - goto WIN; \ -} while (0) - /* If defined, a C expression to determine the base term of address X. This macro is used in only one place: `find_base_term' in alias.c.