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]
Other format: [Raw text]

Minor mips tweak


This patch just tightens the check for UNSPEC constants.  I'm not sure
whether anything would break otherwise, but it seems more robust.

Tested on the targets listed previously, installed as obvious.

Richard


	* config/mips/mips.c (mips_classify_constant): Only allow UNSPECs
	if TARGET_EXPLICIT_RELOCS.
	
diff -c -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.322 mips.c
*** config/mips/mips.c	4 Oct 2003 08:11:06 -0000	1.322
--- config/mips/mips.c	5 Oct 2003 08:18:40 -0000
*************** mips_classify_constant (struct mips_cons
*** 853,859 ****
  	  x = XEXP (x, 0);
  	}
  
!       if (GET_CODE (x) == UNSPEC
  	  && mips_reloc_offset_ok_p (XINT (x, 1), info->offset))
  	{
  	  info->reloc = XINT (x, 1);
--- 853,860 ----
  	  x = XEXP (x, 0);
  	}
  
!       if (TARGET_EXPLICIT_RELOCS
! 	  && GET_CODE (x) == UNSPEC
  	  && mips_reloc_offset_ok_p (XINT (x, 1), info->offset))
  	{
  	  info->reloc = XINT (x, 1);


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