altivec-8.c: New.

2002-05-02  Aldy Hernandez  <aldyh@redhat.com>

        * gcc.dg/altivec-8.c: New.

        * config/rs6000/rs6000.c (rs6000_legitimate_address): Disallow
        PRE_INC and PRE_DEC for altivec modes.

From-SVN: r53031
This commit is contained in:
Aldy Hernandez 2002-05-02 02:03:14 +00:00 committed by Aldy Hernandez
parent ecab2143c0
commit 0d6d689229
4 changed files with 30 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2002-05-02 Aldy Hernandez <aldyh@redhat.com>
* gcc.dg/altivec-8.c: New.
* config/rs6000/rs6000.c (rs6000_legitimate_address): Disallow
PRE_INC and PRE_DEC for altivec modes.
2002-05-01 Jeff Law <law@redhat.com>
* pa.h (EXTRA_CONSTRAINT): Don't accept PIC addresses for the

View File

@ -2048,6 +2048,7 @@ rs6000_legitimate_address (mode, x, reg_ok_strict)
if (LEGITIMATE_INDIRECT_ADDRESS_P (x, reg_ok_strict))
return 1;
if ((GET_CODE (x) == PRE_INC || GET_CODE (x) == PRE_DEC)
&& !ALTIVEC_VECTOR_MODE (mode)
&& TARGET_UPDATE
&& LEGITIMATE_INDIRECT_ADDRESS_P (XEXP (x, 0), reg_ok_strict))
return 1;

View File

@ -1,3 +1,7 @@
2002-05-02 Aldy Hernandez <aldyh@redhat.com>
* gcc.dg/altivec-8.c: New.
2002-05-01 Aldy Hernandez <aldyh@redhat.com>
* gcc.dg/altivec-7.c: New.

View File

@ -0,0 +1,18 @@
/* Origin: Aldy Hernandez <aldyh@redhat.com> */
/* Test rs6000_legitimate_address. PRE_INC should be invalid. */
/* { dg-do compile { target powerpc-*-* } } */
/* { dg-options "-maltivec" } */
#include <altivec.h>
vector signed short *hannah;
int
main ()
{
*hannah++ = __builtin_altivec_vspltish (5);
*hannah++ = __builtin_altivec_vspltish (6);
return 0;
}