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]

[PATCH] Fix for powerpc-linux-gnualtivec




I caught this one when working on the AltiVec stuff with
checking turned on.

Pre-Approved  by Geoff Keating.

alanm@redhat.com (Alan Matsuoka) writes:

# > Hey guy,
# > 
# > 
# > I was running a build with all the checking flags turned on 
# > while looking for a problem with my stuff when I ran into an
# > abort inside LEGITIMATE_OFFSET_ADDRESS_P
# > 
# > *************** typedef struct rs6000_args
# > *** 1969,1973 ****
# >     && INT_REG_OK_FOR_BASE_P (XEXP (X, 0), (STRICT))            \
# >     && LEGITIMATE_ADDRESS_INTEGER_P (XEXP (X, 1), 0)            \
# > !   && (! ALTIVEC_VECTOR_MODE (MODE) || INTVAL (X) == 0)                \
# >     && (((MODE) != DFmode && (MODE) != DImode)                  \
# >         || (TARGET_32BIT                                                \
# > --- 2116,2121 ----
# >     && INT_REG_OK_FOR_BASE_P (XEXP (X, 0), (STRICT))            \
# >     && LEGITIMATE_ADDRESS_INTEGER_P (XEXP (X, 1), 0)            \
# > !   && (! ALTIVEC_VECTOR_MODE (mode)                            \
# > !       || (GET_CODE (XEXP (X,1)) == CONST_INT && INTVAL (XEXP (X,1)) == 0)) \
# >     && (((MODE) != DFmode && (MODE) != DImode)                  \
# >         || (TARGET_32BIT                                                \
# > 
# > 
# > rtl checking aborts in the INTVAL (X) because it was looking at a const_int
# > I think that this is what fixes it.
# 
# Good catch!
# 
# Please send this to the FSF list, with a ChangeLog entry, and you can
# say I approved it in advance.
# 
# -- 
# - Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>


Bootstrapped on ppc linux without any regressions.

Wed Feb 20 00:03:25 EST 2002 Alan Matsuoka <alanm@redhat.com>

	* config/rs6000/rs6000.h (LEGITIMATE_OFFSET_ADDRESS_P): Look
	  for (const_int 0) in X not just INTVAL.


Index: rs6000.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.h,v
retrieving revision 1.181
diff -d -c -p -r1.181 rs6000.h
*** rs6000.h	2002/02/19 02:53:36	1.181
--- rs6000.h	2002/02/20 04:52:08
*************** typedef struct rs6000_args
*** 1971,1977 ****
    && GET_CODE (XEXP (X, 0)) == REG				\
    && INT_REG_OK_FOR_BASE_P (XEXP (X, 0), (STRICT))		\
    && LEGITIMATE_ADDRESS_INTEGER_P (XEXP (X, 1), 0)		\
!   && (! ALTIVEC_VECTOR_MODE (MODE) || INTVAL (X) == 0)		\
    && (((MODE) != DFmode && (MODE) != DImode)			\
        || (TARGET_32BIT						\
  	  ? LEGITIMATE_ADDRESS_INTEGER_P (XEXP (X, 1), 4) 	\
--- 1971,1978 ----
    && GET_CODE (XEXP (X, 0)) == REG				\
    && INT_REG_OK_FOR_BASE_P (XEXP (X, 0), (STRICT))		\
    && LEGITIMATE_ADDRESS_INTEGER_P (XEXP (X, 1), 0)		\
!   && (! ALTIVEC_VECTOR_MODE (mode)                            \
!       || (GET_CODE (XEXP (X,1)) == CONST_INT && INTVAL (XEXP (X,1)) == 0)) \
    && (((MODE) != DFmode && (MODE) != DImode)			\
        || (TARGET_32BIT						\
  	  ? LEGITIMATE_ADDRESS_INTEGER_P (XEXP (X, 1), 4) 	\

Alan Matsuoka
GCC Engineering
Red Hat Canada, Ltd
mailto:alanm@redhat.com Tel: (416) 482-2661 x250 / Fax: (416) 482-6299


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