Blame SOURCES/gcc32-ppc-altivec-ap.patch

4ac4fd
2004-03-30  Hartmut Penner  <hpenner@de.ibm.com>
4ac4fd
4ac4fd
	PR 11591
4ac4fd
	* config/rs6000/rs6000.c (rs6000_legitimate_address):
4ac4fd
	Allow any offset to argument pointer in no-strict case.
4ac4fd
4ac4fd
2002-04-16  Jakub Jelinek  <jakub@redhat.com>
4ac4fd
4ac4fd
	* gcc.dg/altivec-5.c: New test.
4ac4fd
4ac4fd
--- gcc/config/rs6000/rs6000.c	25 Mar 2004 17:43:19 -0000	1.616
4ac4fd
+++ gcc/config/rs6000/rs6000.c	30 Mar 2004 08:25:30 -0000	1.617
4ac4fd
@@ -3267,7 +3267,8 @@ rs6000_legitimate_address (enum machine_
4ac4fd
   if (! reg_ok_strict
4ac4fd
       && GET_CODE (x) == PLUS
4ac4fd
       && GET_CODE (XEXP (x, 0)) == REG
4ac4fd
-      && XEXP (x, 0) == virtual_stack_vars_rtx
4ac4fd
+      && (XEXP (x, 0) == virtual_stack_vars_rtx
4ac4fd
+         || XEXP (x, 0) == arg_pointer_rtx)
4ac4fd
       && GET_CODE (XEXP (x, 1)) == CONST_INT)
4ac4fd
     return 1;
4ac4fd
   if (legitimate_offset_address_p (mode, x, reg_ok_strict))
4ac4fd
--- gcc/testsuite/gcc.dg/altivec-5.c.jj	2004-10-25 23:16:31.270583520 +0200
4ac4fd
+++ gcc/testsuite/gcc.dg/altivec-5.c	2004-10-25 23:16:40.327975169 +0200
4ac4fd
@@ -0,0 +1,12 @@
4ac4fd
+/* { dg-do compile { target powerpc*-*-* } } */
4ac4fd
+/* { dg-options "-maltivec -O2 -m32" } */
4ac4fd
+
4ac4fd
+#define vector __attribute__((vector_size(16)))
4ac4fd
+
4ac4fd
+void foo (const unsigned long x,
4ac4fd
+	  vector signed int a, vector signed int b)
4ac4fd
+{
4ac4fd
+  unsigned char d[64];
4ac4fd
+
4ac4fd
+  __builtin_altivec_stvewx (b, 0, d);
4ac4fd
+}