From a9e6fc5a604583c33655afac7a37884f1c9d58d6 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Tue, 23 Sep 2008 18:28:24 +0000 Subject: [PATCH] tm.texi (FIND_BASE_TERM): Expand documentation. gcc/ * doc/tm.texi (FIND_BASE_TERM): Expand documentation. * config/i386/i386.c (ix86_find_base_term): Don't check for SYMBOL_REF and LABEL_REF. From-SVN: r140610 --- gcc/ChangeLog | 6 ++++++ gcc/config/i386/i386.c | 16 ++-------------- gcc/doc/tm.texi | 6 ++++-- 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ce00f84..ad8ac8d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2008-09-23 Richard Sandiford + * doc/tm.texi (FIND_BASE_TERM): Expand documentation. + * config/i386/i386.c (ix86_find_base_term): Don't check for + SYMBOL_REF and LABEL_REF. + +2008-09-23 Richard Sandiford + * config/i386/i386.c (ix86_delegitimize_address): Wrap the constant PLUS in a CONST. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 5872124..024e433 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -10077,22 +10077,10 @@ ix86_find_base_term (rtx x) || XINT (term, 1) != UNSPEC_GOTPCREL) return x; - term = XVECEXP (term, 0, 0); - - if (GET_CODE (term) != SYMBOL_REF - && GET_CODE (term) != LABEL_REF) - return x; - - return term; + return XVECEXP (term, 0, 0); } - term = ix86_delegitimize_address (x); - - if (GET_CODE (term) != SYMBOL_REF - && GET_CODE (term) != LABEL_REF) - return x; - - return term; + return ix86_delegitimize_address (x); } static void diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index dbff576..634fb0d 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -5353,8 +5353,10 @@ preserve functionality of inline assembly constructs using the @end defmac @defmac FIND_BASE_TERM (@var{x}) -A C expression to determine the base term of address @var{x}. -This macro is used in only one place: `find_base_term' in alias.c. +A C expression to determine the base term of address @var{x}, +or to provide a simplified version of @var{x} from which @file{alias.c} +can easily find the base term. This macro is used in only one place: +@code{find_base_term} in @file{alias.c}. It is always safe for this macro to not be defined. It exists so that alias analysis can understand machine-dependent addresses. -- 2.7.4