This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [m68k 11/13] fix symbolic address recognition during reload
zippel@linux-m68k.org writes:
> Hi,
>
> This patch fixes another reload problem, symbolic_operand() recognizes
> constant addresses, but aren't recognized by GO_IF_LEGITIMATE_ADDRESS,
> so that reload fails, so simply use symbolic_operand() there as well.
>
>
> 2007-01-30 Roman Zippel <zippel@linux-m68k.org>
>
> * config/m68k/m68k.h (INDIRECTABLE_1_ADDRESS_P): Use
> symbolic_operand() to recognize addresses.
>
> ---
>
> gcc/config/m68k/m68k.h | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> Index: gcc-4.1/gcc/config/m68k/m68k.h
> ===================================================================
> --- gcc-4.1.orig/gcc/config/m68k/m68k.h
> +++ gcc-4.1/gcc/config/m68k/m68k.h
> @@ -718,9 +718,7 @@ __transfer_from_trampoline () \
> && (TARGET_68020 \
> || ((unsigned) INTVAL (XEXP (X, 1)) + 0x8000) < 0x10000)) \
> || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx \
> - && flag_pic && GET_CODE (XEXP (X, 1)) == SYMBOL_REF) \
> - || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx \
> - && flag_pic && GET_CODE (XEXP (X, 1)) == LABEL_REF))
> + && flag_pic && symbolic_operand (XEXP (X, 1), VOIDmode))) \
>
> #define GO_IF_NONINDEXED_ADDRESS(X, ADDR) \
> { if (INDIRECTABLE_1_ADDRESS_P (X)) goto ADDR; }
I'm not sure about this. We want to load the symbol or label
and add the offset separately, don't we? That's certainly
what the pre-reload code does.
Can you give a few more details about how this fails? How do
we end up with (plus pic_offset_table_rtx (const (plus ...)))?
Richard