From 331d91868977fe50f5d937a9c195b6418bfda5c3 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Fri, 15 May 2009 07:12:03 +0000 Subject: [PATCH] frv.h: Clean up references to GO_IF_LEGITIMATE_ADDRESS. 2009-05-15 Paolo Bonzini * config/frv/frv.h: Clean up references to GO_IF_LEGITIMATE_ADDRESS. * config/frv/frv.c: Likewise. * config/s390/s390.c: Likewise. * config/sparc/sparc.h: Likewise. * config/i386/i386.h: Likewise. * config/i386/i386.c: Likewise. * config/crx/crx.c: Likewise. * config/m68hc11/m68hc11.h: Likewise. * config/iq2000/iq2000.c: Likewise. * config/mn10300/mn10300.h: Likewise. * config/mn10300/mn10300.c: Likewise. * config/m68k/m68k.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rs6000/xcoff.h: Likewise. * config/rs6000/linux64.h: Likewise. * config/rs6000/sysv4.h: Likewise. * config/score/score3.c: Likewise. * config/score/score7.c: Likewise. * config/score/score.c: Likewise. * config/arm/arm.md: Likewise. * config/mips/mips.c: Likewise. * config/mips/mips.md: Likewise. * config/bfin/bfin.h: Likewise. * config/pa/pa.c: Likewise. * config/pa/constraints.md: Likewise. * config/pdp11/pdp11-protos.h (legitimate_address_p): Delete. * config/pdp11/pdp11.c (legitimate_address_p): Delete. * config/pdp11/pdp11.h: Use memory_address_p instead. From-SVN: r147560 --- gcc/ChangeLog | 32 ++++++++++++++++++++++++++++++++ gcc/config/arm/arm.md | 8 ++++---- gcc/config/bfin/bfin.h | 2 +- gcc/config/crx/crx.c | 2 +- gcc/config/frv/frv.c | 24 +----------------------- gcc/config/frv/frv.h | 2 +- gcc/config/i386/i386.c | 11 ++++------- gcc/config/i386/i386.h | 4 ++-- gcc/config/iq2000/iq2000.c | 2 +- gcc/config/m68hc11/m68hc11.h | 2 +- gcc/config/m68k/m68k.c | 2 +- gcc/config/mips/mips.c | 2 +- gcc/config/mips/mips.md | 2 +- gcc/config/mn10300/mn10300.c | 3 --- gcc/config/pa/constraints.md | 2 +- gcc/config/pa/pa.c | 3 --- gcc/config/pdp11/pdp11-protos.h | 1 - gcc/config/pdp11/pdp11.c | 14 -------------- gcc/config/pdp11/pdp11.h | 2 +- gcc/config/rs6000/linux64.h | 5 ++--- gcc/config/rs6000/rs6000.c | 4 +--- gcc/config/rs6000/sysv4.h | 4 ++-- gcc/config/rs6000/xcoff.h | 7 +++---- gcc/config/s390/s390.c | 2 +- gcc/config/score/score.c | 2 +- gcc/config/score/score3.c | 2 +- gcc/config/score/score7.c | 2 +- gcc/config/sparc/sparc.h | 12 +++--------- 28 files changed, 68 insertions(+), 92 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0cd4a41e1596..b089b1d4cd10 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,35 @@ +2009-05-15 Paolo Bonzini + + * config/frv/frv.h: Clean up references to GO_IF_LEGITIMATE_ADDRESS. + * config/frv/frv.c: Likewise. + * config/s390/s390.c: Likewise. + * config/sparc/sparc.h: Likewise. + * config/i386/i386.h: Likewise. + * config/i386/i386.c: Likewise. + * config/crx/crx.c: Likewise. + * config/m68hc11/m68hc11.h: Likewise. + * config/iq2000/iq2000.c: Likewise. + * config/mn10300/mn10300.h: Likewise. + * config/mn10300/mn10300.c: Likewise. + * config/m68k/m68k.c: Likewise. + * config/rs6000/rs6000.c: Likewise. + * config/rs6000/xcoff.h: Likewise. + * config/rs6000/linux64.h: Likewise. + * config/rs6000/sysv4.h: Likewise. + * config/score/score3.c: Likewise. + * config/score/score7.c: Likewise. + * config/score/score.c: Likewise. + * config/arm/arm.md: Likewise. + * config/mips/mips.c: Likewise. + * config/mips/mips.md: Likewise. + * config/bfin/bfin.h: Likewise. + * config/pa/pa.c: Likewise. + * config/pa/constraints.md: Likewise. + + * config/pdp11/pdp11-protos.h (legitimate_address_p): Delete. + * config/pdp11/pdp11.c (legitimate_address_p): Delete. + * config/pdp11/pdp11.h: Use memory_address_p instead. + 2009-05-14 Ian Lance Taylor * passes.c (finish_optimization_passes): Change i to int. diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index b18173e1affd..6f4f64cf6c19 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -5476,8 +5476,8 @@ /* ??? We shouldn't really get invalid addresses here, but this can happen if we are passed a SP (never OK for HImode/QImode) or - virtual register (rejected by GO_IF_LEGITIMATE_ADDRESS for - HImode/QImode) relative address. */ + virtual register (also rejected as illegitimate for HImode/QImode) + relative address. */ /* ??? This should perhaps be fixed elsewhere, for instance, in fixup_stack_1, by checking for other kinds of invalid addresses, e.g. a bare reference to a virtual register. This may confuse the @@ -5708,8 +5708,8 @@ { /* ??? We shouldn't really get invalid addresses here, but this can happen if we are passed a SP (never OK for HImode/QImode) or - virtual register (rejected by GO_IF_LEGITIMATE_ADDRESS for - HImode/QImode) relative address. */ + virtual register (also rejected as illegitimate for HImode/QImode) + relative address. */ /* ??? This should perhaps be fixed elsewhere, for instance, in fixup_stack_1, by checking for other kinds of invalid addresses, e.g. a bare reference to a virtual register. This may confuse the diff --git a/gcc/config/bfin/bfin.h b/gcc/config/bfin/bfin.h index 7cd6756309bd..29e4f9108429 100644 --- a/gcc/config/bfin/bfin.h +++ b/gcc/config/bfin/bfin.h @@ -908,7 +908,7 @@ typedef struct { /* A number, the maximum number of registers that can appear in a valid memory address. Note that it is up to you to specify a - value equal to the maximum number that `GO_IF_LEGITIMATE_ADDRESS' + value equal to the maximum number that `TARGET_LEGITIMATE_ADDRESS_P' would ever accept. */ #define MAX_REGS_PER_ADDRESS 1 diff --git a/gcc/config/crx/crx.c b/gcc/config/crx/crx.c index c45189eb0d36..0ea5fbca7a1a 100644 --- a/gcc/config/crx/crx.c +++ b/gcc/config/crx/crx.c @@ -545,7 +545,7 @@ crx_function_arg_regno_p (int n) /* ADDRESSING MODES */ /* ---------------- */ -/* Implements the macro GO_IF_LEGITIMATE_ADDRESS defined in crx.h. +/* Implements the hook for TARGET_LEGITIMATE_ADDRESS_P defined in crx.h. * The following addressing modes are supported on CRX: * * Relocations --> const | symbol_ref | label_ref diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c index 1db3496b5be7..c7e717e05ae5 100644 --- a/gcc/config/frv/frv.c +++ b/gcc/config/frv/frv.c @@ -3327,12 +3327,6 @@ frv_regno_ok_for_base_p (int regno, int strict_p) conditional to define the strict variant in that case and the non-strict variant otherwise. - Subroutines to check for acceptable registers for various purposes (one for - base registers, one for index registers, and so on) are typically among the - subroutines used to define `GO_IF_LEGITIMATE_ADDRESS'. Then only these - subroutine macros need have two variants; the higher levels of macros may be - the same whether strict or not. - Normally, constant addresses which are the sum of a `symbol_ref' and an integer are stored inside a `const' RTX to mark them as constant. Therefore, there is no need to recognize such sums specifically as @@ -3343,22 +3337,6 @@ frv_regno_ok_for_base_p (int regno, int strict_p) are not marked with `const'. It assumes that a naked `plus' indicates indexing. If so, then you *must* reject such naked constant sums as illegitimate addresses, so that none of them will be given to - `PRINT_OPERAND_ADDRESS'. - - On some machines, whether a symbolic address is legitimate depends on the - section that the address refers to. On these machines, define the macro - `ENCODE_SECTION_INFO' to store the information into the `symbol_ref', and - then check for it here. When you see a `const', you will have to look - inside it to find the `symbol_ref' in order to determine the section. - - The best way to modify the name string is by adding text to the beginning, - with suitable punctuation to prevent any ambiguity. Allocate the new name - in `saveable_obstack'. You will have to modify `ASM_OUTPUT_LABELREF' to - remove and decode the added text and output the name accordingly, and define - `(* targetm.strip_name_encoding)' to access the original name string. - - You can check the information stored here into the `symbol_ref' in the - definitions of the macros `GO_IF_LEGITIMATE_ADDRESS' and `PRINT_OPERAND_ADDRESS'. */ int @@ -3484,7 +3462,7 @@ frv_legitimate_address_p_1 (enum machine_mode mode, if (TARGET_DEBUG_ADDR) { - fprintf (stderr, "\n========== GO_IF_LEGITIMATE_ADDRESS, mode = %s, result = %d, addresses are %sstrict%s\n", + fprintf (stderr, "\n========== legitimate_address_p, mode = %s, result = %d, addresses are %sstrict%s\n", GET_MODE_NAME (mode), ret, (strict_p) ? "" : "not ", (condexec_p) ? ", inside conditional code" : ""); debug_rtx (x); diff --git a/gcc/config/frv/frv.h b/gcc/config/frv/frv.h index e605bb21a8e8..15047e3c7ed5 100644 --- a/gcc/config/frv/frv.h +++ b/gcc/config/frv/frv.h @@ -2022,7 +2022,7 @@ __asm__("\n" \ /* A number, the maximum number of registers that can appear in a valid memory address. Note that it is up to you to specify a value equal to the maximum - number that `GO_IF_LEGITIMATE_ADDRESS' would ever accept. */ + number that `TARGET_LEGITIMATE_ADDRESS_P' would ever accept. */ #define MAX_REGS_PER_ADDRESS 2 /* A C expression that is nonzero if X (assumed to be a `reg' RTX) is valid for diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 593ea84ffa65..743618c4dea8 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -9258,9 +9258,9 @@ legitimate_pic_address_disp_p (rtx disp) return 0; } -/* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression that is a valid - memory address for an instruction. The MODE argument is the machine mode - for the MEM expression that wants to use this address. +/* Recognizes RTL expressions that are valid memory addresses for an + instruction. The MODE argument is the machine mode for the MEM + expression that wants to use this address. It only recognizes address in canonical form. LEGITIMIZE_ADDRESS should convert common non-canonical forms to canonical form so that they will @@ -9527,7 +9527,7 @@ ix86_GOT_alias_set (void) differentiate them from global data objects. The returned address is the PIC reg + an unspec constant. - GO_IF_LEGITIMATE_ADDRESS rejects symbolic references unless the PIC + TARGET_LEGITIMATE_ADDRESS_P rejects symbolic references unless the PIC reg also appears in the address. */ static rtx @@ -10011,9 +10011,6 @@ legitimize_dllimport_symbol (rtx symbol, bool want_reg) OLDX is the address as it was before break_out_memory_refs was called. In some cases it is useful to look at this to decide what needs to be done. - MODE and WIN are passed so that this macro can use - GO_IF_LEGITIMATE_ADDRESS. - It is always safe for this macro to do nothing. It exists to recognize opportunities to optimize the output. diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 0a9e8a667329..f41ed7db665c 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -1803,12 +1803,12 @@ typedef struct ix86_args { #define REG_OK_FOR_BASE_P(X) REG_OK_FOR_BASE_STRICT_P (X) #endif -/* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression +/* TARGET_LEGITIMATE_ADDRESS_P recognizes an RTL expression that is a valid memory address for an instruction. The MODE argument is the machine mode for the MEM expression that wants to use this address. - The other macros defined here are used only in GO_IF_LEGITIMATE_ADDRESS, + The other macros defined here are used only in TARGET_LEGITIMATE_ADDRESS_P, except for CONSTANT_ADDRESS_P which is usually machine-independent. See legitimize_pic_address in i386.c for details as to what diff --git a/gcc/config/iq2000/iq2000.c b/gcc/config/iq2000/iq2000.c index d61ec3f7192f..5ba18886778c 100644 --- a/gcc/config/iq2000/iq2000.c +++ b/gcc/config/iq2000/iq2000.c @@ -258,7 +258,7 @@ iq2000_legitimate_address_p (enum machine_mode mode, rtx xinsn, bool strict) { if (TARGET_DEBUG_A_MODE) { - GO_PRINTF2 ("\n========== GO_IF_LEGITIMATE_ADDRESS, %sstrict\n", + GO_PRINTF2 ("\n========== legitimate_address_p, %sstrict\n", strict ? "" : "not "); GO_DEBUG_RTX (xinsn); } diff --git a/gcc/config/m68hc11/m68hc11.h b/gcc/config/m68hc11/m68hc11.h index a394403752a8..e795485f9c18 100644 --- a/gcc/config/m68hc11/m68hc11.h +++ b/gcc/config/m68hc11/m68hc11.h @@ -1132,7 +1132,7 @@ extern unsigned char m68hc11_reg_valid_for_index[FIRST_PSEUDO_REGISTER]; /* Maximum number of registers that can appear in a valid memory address */ #define MAX_REGS_PER_ADDRESS 2 -/* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression that is a +/* TARGET_LEGITIMATE_ADDRESS_P recognizes an RTL expression that is a valid memory address for an instruction. The MODE argument is the machine mode for the MEM expression that wants to use this address. */ diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index ce028a02a660..3e463023625e 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -4269,7 +4269,7 @@ strict_low_part_peephole_ok (enum machine_mode mode, rtx first_insn, simple fact that the m68k does not allow a pc-relative addressing mode as a destination. gcc does not distinguish between source and destination addresses. Hence, if we claim that pc-relative address - modes are valid, e.g. GO_IF_LEGITIMATE_ADDRESS accepts them, then we + modes are valid, e.g. TARGET_LEGITIMATE_ADDRESS_P accepts them, then we end up with invalid code. To get around this problem, we left pc-relative modes as invalid addresses, and then added special predicates and constraints to accept them. diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 36521ca8ceba..ed10c391971c 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -2140,7 +2140,7 @@ mips_stack_address_p (rtx x, enum machine_mode mode) /* Return true if ADDR matches the pattern for the LWXS load scaled indexed address instruction. Note that such addresses are not considered - legitimate in the GO_IF_LEGITIMATE_ADDRESS sense, because their use + legitimate in the TARGET_LEGITIMATE_ADDRESS_P sense, because their use is so restricted. */ static bool diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md index 3b44a84104be..78539cbe49db 100644 --- a/gcc/config/mips/mips.md +++ b/gcc/config/mips/mips.md @@ -4081,7 +4081,7 @@ ;; instructions will still work correctly. ;; ??? Perhaps it would be better to support these instructions by -;; modifying GO_IF_LEGITIMATE_ADDRESS and friends. However, since +;; modifying TARGET_LEGITIMATE_ADDRESS_P and friends. However, since ;; these instructions can only be used to load and store floating ;; point registers, that would probably cause trouble in reload. diff --git a/gcc/config/mn10300/mn10300.c b/gcc/config/mn10300/mn10300.c index e32f3766d646..608f8a0fa35e 100644 --- a/gcc/config/mn10300/mn10300.c +++ b/gcc/config/mn10300/mn10300.c @@ -1794,9 +1794,6 @@ symbolic_operand (register rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) OLDX is the address as it was before break_out_memory_refs was called. In some cases it is useful to look at this to decide what needs to be done. - MODE and WIN are passed so that this macro can use - GO_IF_LEGITIMATE_ADDRESS. - Normally it is always safe for this macro to do nothing. It exists to recognize opportunities to optimize the output. diff --git a/gcc/config/pa/constraints.md b/gcc/config/pa/constraints.md index fdf3c9884101..c1f3d5cd3f35 100644 --- a/gcc/config/pa/constraints.md +++ b/gcc/config/pa/constraints.md @@ -131,7 +131,7 @@ ? SFmode : DFmode), XEXP (op, 0))"))) -;; We could allow short displacements but GO_IF_LEGITIMATE_ADDRESS +;; We could allow short displacements but TARGET_LEGITIMATE_ADDRESS_P ;; can't tell when a long displacement is valid. (define_constraint "W" "A register indirect memory operand." diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 882fac1aad45..a55f2ec01478 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -871,9 +871,6 @@ legitimize_tls_address (rtx addr) OLDX is the address as it was before break_out_memory_refs was called. In some cases it is useful to look at this to decide what needs to be done. - MODE and WIN are passed so that this macro can use - GO_IF_LEGITIMATE_ADDRESS. - It is always safe for this macro to do nothing. It exists to recognize opportunities to optimize the output. diff --git a/gcc/config/pdp11/pdp11-protos.h b/gcc/config/pdp11/pdp11-protos.h index 1ed272e50814..2c4bd22fde66 100644 --- a/gcc/config/pdp11/pdp11-protos.h +++ b/gcc/config/pdp11/pdp11-protos.h @@ -26,7 +26,6 @@ extern int expand_shift_operand (rtx, enum machine_mode); extern int immediate15_operand (rtx, enum machine_mode); extern int simple_memory_operand (rtx, enum machine_mode); -extern int legitimate_address_p (enum machine_mode, rtx); extern int legitimate_const_double_p (rtx); extern void notice_update_cc_on_set (rtx, rtx); extern void output_addr_const_pdp11 (FILE *, rtx); diff --git a/gcc/config/pdp11/pdp11.c b/gcc/config/pdp11/pdp11.c index 8f2d78fe555c..b46760897a51 100644 --- a/gcc/config/pdp11/pdp11.c +++ b/gcc/config/pdp11/pdp11.c @@ -1606,20 +1606,6 @@ output_block_move(rtx *operands) return ""; } -int -legitimate_address_p (enum machine_mode mode, rtx address) -{ -/* #define REG_OK_STRICT */ - GO_IF_LEGITIMATE_ADDRESS(mode, address, win); - - return 0; - - win: - return 1; - -/* #undef REG_OK_STRICT */ -} - /* This function checks whether a real value can be encoded as a literal, i.e., addressing mode 27. In that mode, real values are one word values, so the remaining 48 bits have to be zero. */ diff --git a/gcc/config/pdp11/pdp11.h b/gcc/config/pdp11/pdp11.h index 437e2b81e2e1..ac678f5cb5b6 100644 --- a/gcc/config/pdp11/pdp11.h +++ b/gcc/config/pdp11/pdp11.h @@ -371,7 +371,7 @@ enum reg_class { NO_REGS, MUL_REGS, GENERAL_REGS, LOAD_FPU_REGS, NO_LOAD_FPU_REG #define EXTRA_CONSTRAINT(OP,CODE) \ ((GET_CODE (OP) != MEM) ? 0 \ - : !legitimate_address_p (GET_MODE (OP), XEXP (OP, 0)) ? 0 \ + : !memory_address_p (GET_MODE (OP), XEXP (OP, 0)) ? 0 \ : ((CODE) == 'Q') ? !simple_memory_operand (OP, GET_MODE (OP)) \ : ((CODE) == 'R') ? simple_memory_operand (OP, GET_MODE (OP)) \ : 0) diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h index 1b4a36c030db..c3193dcfe0de 100644 --- a/gcc/config/rs6000/linux64.h +++ b/gcc/config/rs6000/linux64.h @@ -471,9 +471,8 @@ extern int dot_symbols; we also do this for floating-point constants. We actually can only do this if the FP formats of the target and host machines are the same, but we can't check that since not every file that uses - GO_IF_LEGITIMATE_ADDRESS_P includes real.h. We also do this when - we can write the entry into the TOC and the entry is not larger - than a TOC entry. */ + the macros includes real.h. We also do this when we can write the + entry into the TOC and the entry is not larger than a TOC entry. */ #undef ASM_OUTPUT_SPECIAL_POOL_ENTRY_P #define ASM_OUTPUT_SPECIAL_POOL_ENTRY_P(X, MODE) \ diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index a308731b291c..be2eca084b1f 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -3794,8 +3794,6 @@ legitimate_lo_sum_address_p (enum machine_mode mode, rtx x, int strict) called. In some cases it is useful to look at this to decide what needs to be done. - MODE is passed so that this function can use GO_IF_LEGITIMATE_ADDRESS. - It is always safe for this function to do nothing. It exists to recognize opportunities to optimize the output. @@ -4390,7 +4388,7 @@ rs6000_legitimize_reload_address (rtx x, enum machine_mode mode, return x; } -/* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression +/* TARGET_LEGITIMATE_ADDRESS_P recognizes an RTL expression that is a valid memory address for an instruction. The MODE argument is the machine mode for the MEM expression that wants to use this address. diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h index e8d516268ef9..611c0d299c8f 100644 --- a/gcc/config/rs6000/sysv4.h +++ b/gcc/config/rs6000/sysv4.h @@ -387,8 +387,8 @@ do { \ containing one of them. If -mfp-in-toc (the default), we also do this for floating-point constants. We actually can only do this if the FP formats of the target and host machines are the same, but - we can't check that since not every file that uses - GO_IF_LEGITIMATE_ADDRESS_P includes real.h. + we can't check that since not every file that uses these target macros + includes real.h. Unlike AIX, we don't key off of -mminimal-toc, but instead do not allow floating point constants in the TOC if -mrelocatable. */ diff --git a/gcc/config/rs6000/xcoff.h b/gcc/config/rs6000/xcoff.h index 76bbf4044d2f..6560f319a25a 100644 --- a/gcc/config/rs6000/xcoff.h +++ b/gcc/config/rs6000/xcoff.h @@ -70,10 +70,9 @@ or a CONST containing one of them. If -mfp-in-toc (the default), we also do this for floating-point constants. We actually can only do this if the FP formats of the target and host machines are the - same, but we can't check that since not every file that uses - GO_IF_LEGITIMATE_ADDRESS_P includes real.h. We also do this when - we can write the entry into the TOC and the entry is not larger - than a TOC entry. */ + same, but we can't check that since not every file that uses these + target macros includes real.h. We also do this when we can write the + entry into the TOC and the entry is not larger than a TOC entry. */ #define ASM_OUTPUT_SPECIAL_POOL_ENTRY_P(X, MODE) \ (TARGET_TOC \ diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 7f9dd132fe23..b1cfad1adfec 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -3190,7 +3190,7 @@ s390_load_address (rtx dst, rtx src) differentiate them from global data objects. The returned address is the PIC reg + an unspec constant. - GO_IF_LEGITIMATE_ADDRESS rejects symbolic references unless the PIC + TARGET_LEGITIMIZE_ADDRESS_P rejects symbolic references unless the PIC reg also appears in the address. */ rtx diff --git a/gcc/config/score/score.c b/gcc/config/score/score.c index 0b737459765a..b75f3cfaebfa 100644 --- a/gcc/config/score/score.c +++ b/gcc/config/score/score.c @@ -533,7 +533,7 @@ score_regno_mode_ok_for_base_p (int regno, int strict) gcc_unreachable (); } -/* Implement GO_IF_LEGITIMATE_ADDRESS macro. */ +/* Implement TARGET_LEGITIMIZE_ADDRESS_P. */ bool score_legitimate_address_p (enum machine_mode mode, rtx x, bool strict) { diff --git a/gcc/config/score/score3.c b/gcc/config/score/score3.c index 4ac7e60d88cb..4258d29e5257 100644 --- a/gcc/config/score/score3.c +++ b/gcc/config/score/score3.c @@ -910,7 +910,7 @@ score3_regno_mode_ok_for_base_p (int regno, int strict) return GP_REG_P (regno); } -/* Implement GO_IF_LEGITIMATE_ADDRESS macro. */ +/* Implement TARGET_LEGITIMATE_ADDRESS_P macro. */ bool score3_legitimate_address_p (enum machine_mode mode, rtx x, bool strict) { diff --git a/gcc/config/score/score7.c b/gcc/config/score/score7.c index c18d03b26750..9ab6ebd3004b 100644 --- a/gcc/config/score/score7.c +++ b/gcc/config/score/score7.c @@ -901,7 +901,7 @@ score7_regno_mode_ok_for_base_p (int regno, int strict) return GP_REG_P (regno); } -/* Implement GO_IF_LEGITIMATE_ADDRESS macro. */ +/* Implement TARGET_LEGITIMATE_ADDRESS_P macro. */ bool score7_legitimate_address_p (enum machine_mode mode, rtx x, bool strict) { diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h index 1aef109b113f..406ee68cf2f9 100644 --- a/gcc/config/sparc/sparc.h +++ b/gcc/config/sparc/sparc.h @@ -1845,15 +1845,9 @@ do { \ #define USE_AS_OFFSETABLE_LO10 0 #endif -/* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression - that is a valid memory address for an instruction. - The MODE argument is the machine mode for the MEM expression - that wants to use this address. - - On SPARC, the actual legitimate addresses must be REG+REG or REG+SMALLINT - ordinarily. This changes a bit when generating PIC. - - If you change this, execute "rm explow.o recog.o reload.o". */ +/* On SPARC, the actual legitimate addresses must be REG+REG or REG+SMALLINT + ordinarily. This changes a bit when generating PIC. The details are + in sparc.c's implementation of TARGET_LEGITIMATE_ADDRESS_P. */ #define SYMBOLIC_CONST(X) symbolic_operand (X, VOIDmode) -- 2.39.5