From 115b618171dea703f1785cf5b0a595985cf93f2a Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Thu, 10 Jan 2002 02:54:12 +0000 Subject: [PATCH] altivec-4.c: Add test for mtvscr, dssall, mfvscr, dss, lvsl, lvsr, dstt, dstst, dststt, dst. 2002-01-08 Aldy Hernandez * testuite/gcc.dg/altivec-4.c: Add test for mtvscr, dssall, mfvscr, dss, lvsl, lvsr, dstt, dstst, dststt, dst. From-SVN: r48709 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/altivec-4.c | 29 ++++++++++++++++++++++++----- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1f10c6f0945..3c7927f78ef 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2002-01-08 Aldy Hernandez + + * gcc.dg/altivec-4.c: Add test for mtvscr, dssall, mfvscr, + dss, lvsl, lvsr, dstt, dstst, dststt, dst. + 2002-01-09 Richard Henderson * gcc.c-torture/execute/20020108-1.c: Rewrite to choose the proper diff --git a/gcc/testsuite/gcc.dg/altivec-4.c b/gcc/testsuite/gcc.dg/altivec-4.c index 21fb8f6e073..4994f7dc5ac 100644 --- a/gcc/testsuite/gcc.dg/altivec-4.c +++ b/gcc/testsuite/gcc.dg/altivec-4.c @@ -3,12 +3,18 @@ #define vector __attribute__((vector_size(16))) -int __attribute__((mode(V4SI))) x, y; +static int __attribute__((mode(V4SI))) x, y; -vector int i,j,k; -vector short s,t,u; -vector signed char c,d,e; -vector float f,g,h; +static vector signed int i,j,k; +static vector signed short s,t; +static vector signed char c,d; +static vector float f,g; + +static vector unsigned char uc; + +static vector signed int *pi; + +static int int1, int2; void b() @@ -30,4 +36,17 @@ b() k = __builtin_altivec_vcmpgtub_p (c, d); k = __builtin_altivec_vcmpgtuh_p (s, t); k = __builtin_altivec_vcmpgtuw_p (i, j); + + __builtin_altivec_mtvscr (i); + __builtin_altivec_dssall (); + s = __builtin_altivec_mfvscr (); + __builtin_altivec_dss (3); + + __builtin_altivec_dst (pi, int1 + int2, 3); + __builtin_altivec_dstst (pi, int1 + int2, 3); + __builtin_altivec_dststt (pi, int1 + int2, 3); + __builtin_altivec_dstt (pi, int1 + int2, 3); + + uc = (vector unsigned char) __builtin_altivec_lvsl (int1 + 69, pi); + uc = (vector unsigned char) __builtin_altivec_lvsr (int1 + 69, pi); }