Fix FR30 build problem.

Nick Clifton nickc@cambridge.redhat.com
Thu May 2 00:53:00 GMT 2002


Hi Guys,

  I am applying the patch below to fix an FR30 problem.  The port is
  failing to build libgcc at the moment because
  GO_IF_LEGITIMATE_ADDRESS is rejecting a valid address RTL that looks
  like this:

     (plus:SI (reg/v/f:SI 14 fp [26])
        (const_int 4 [0x4]))

  This is because the although the register in question is the frame
  pointer, its RTX is not equal to frame-pointer_rtx.  (Presumably
  because the /v and /f bits have been set).  The patch below fixes
  the macro so that the RTL is accepted when strict register checking
  is not enabled and now libgcc.a can be built.  There are still
  problems building newlib, but these are being investigated.

Cheers
        Nick

2002-05-02  Nick Clifton  <nickc@cambridge.redhat.com>

	* config/fr30/fr30.h (GO_IF_LEGITIMATE_ADDRESS): Accept any form
	of the frame pointer or arg pointer register which strict register
	checking is not enabled.

Index: gcc/config/fr30/fr30.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/fr30/fr30.h,v
retrieving revision 1.32
diff -c -3 -p -w -r1.32 fr30.h
*** gcc/config/fr30/fr30.h	12 Mar 2002 05:27:54 -0000	1.32
--- gcc/config/fr30/fr30.h	2 May 2002 07:33:42 -0000
*************** do										\
*** 1078,1085 ****
  	goto LABEL;							\
        if (GET_CODE (X) == PLUS						\
  	  && ((MODE) == SImode || (MODE) == SFmode)			\
! 	  && (XEXP (X, 0) == frame_pointer_rtx				\
! 	      || XEXP(X,0) == arg_pointer_rtx)				\
  	  && GET_CODE (XEXP (X, 1)) == CONST_INT			\
  	  && IN_RANGE (INTVAL (XEXP (X, 1)), -(1 << 9), (1 <<  9) - 4))	\
          goto LABEL;							\
--- 1078,1086 ----
  	goto LABEL;							\
        if (GET_CODE (X) == PLUS						\
  	  && ((MODE) == SImode || (MODE) == SFmode)			\
! 	  && GET_CODE (XEXP (X, 0)) == REG \
!           && (REGNO (XEXP (X, 0)) == FRAME_POINTER_REGNUM \
!            || REGNO (XEXP (X, 0)) == ARG_POINTER_REGNUM) \
  	  && GET_CODE (XEXP (X, 1)) == CONST_INT			\
  	  && IN_RANGE (INTVAL (XEXP (X, 1)), -(1 << 9), (1 <<  9) - 4))	\
          goto LABEL;							\



More information about the Gcc-patches mailing list