This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: pic problem on the x86
- To: law at cygnus dot com
- Subject: Re: pic problem on the x86
- From: Richard Henderson <rth at cygnus dot com>
- Date: Sat, 13 Feb 1999 13:27:50 -0800
- Cc: egcs-bugs at egcs dot cygnus dot com, egcs-patches at egcs dot cygnus dot com
- References: <12738.918937268@hurl.cygnus.com>
On Sat, Feb 13, 1999 at 01:21:08PM -0700, Jeffrey A Law wrote:
> legitimize_pic_address creates the (const (unspec ... 7)), but I don't see
> anything in i386.md which will recognize this kind of set.
Here's the fix. LEGITIMATE_PIC_OPERAND_P wasn't matching
everything it ought to have.
r~
* i386.c (legitimate_pic_address_disp_p): Remove static.
* i386.h (LEGITIMATE_PIC_OPERAND_P): Use it instead of
open-coding cases.
Index: config/i386/i386.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/i386.c,v
retrieving revision 1.47
diff -c -p -d -r1.47 i386.c
*** i386.c 1999/01/31 12:27:12 1.47
--- i386.c 1999/02/13 21:24:56
*************** do { \
*** 2549,2555 ****
} \
} while (0)
! static int
legitimate_pic_address_disp_p (disp)
register rtx disp;
{
--- 2549,2555 ----
} \
} while (0)
! int
legitimate_pic_address_disp_p (disp)
register rtx disp;
{
Index: config/i386/i386.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/i386.h,v
retrieving revision 1.46
diff -c -p -d -r1.46 i386.h
*** i386.h 1999/02/10 23:10:43 1.46
--- i386.h 1999/02/13 21:24:56
*************** do { \
*** 1790,1797 ****
that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
#define LEGITIMATE_PIC_OPERAND_P(X) \
! (! SYMBOLIC_CONST (X) \
! || (GET_CODE (X) == SYMBOL_REF && CONSTANT_POOL_ADDRESS_P (X)))
#define SYMBOLIC_CONST(X) \
(GET_CODE (X) == SYMBOL_REF \
--- 1790,1796 ----
that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
#define LEGITIMATE_PIC_OPERAND_P(X) \
! (! SYMBOLIC_CONST (X) || legitimate_pic_address_disp_p (X))
#define SYMBOLIC_CONST(X) \
(GET_CODE (X) == SYMBOL_REF \