This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: pic problem on the x86


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						\


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]