diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/powerpc/vec-gnb-10.c')
-rw-r--r-- | gcc/testsuite/gcc.target/powerpc/vec-gnb-10.c | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-gnb-10.c b/gcc/testsuite/gcc.target/powerpc/vec-gnb-10.c deleted file mode 100644 index 73ff0d9fea7..00000000000 --- a/gcc/testsuite/gcc.target/powerpc/vec-gnb-10.c +++ /dev/null @@ -1,72 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-mdejagnu-cpu=future" } */ - -#include <altivec.h> - -extern void abort (void); - -unsigned long long int -do_vec_gnb (vector unsigned char source, unsigned char stride) -{ - switch (stride) - { - case 2: - return vec_gnb (source, 0); /* { dg-error "between 2 and 7" } */ - case 3: - return vec_gnb (source, -1); /* { dg-error "between 2 and 7" } */ - case 4: - return vec_gnb (source, 8); /* { dg-error "between 2 and 7" } */ - case 5: - return vec_gnb (source, 1); /* { dg-error "between 2 and 7" } */ - case 6: - return vec_gnb (source, stride); /* { dg-error "unsigned literal" } */ - case 7: - return vec_gnb (source, 7); - - default: - /* Illegal value of stride */ - abort (); - return 0; - } -} - -int -main (int argc, char *argv []) -{ - /* For result = 0xaaaa_0000_0000_0000, use: - stride = 2: binary 1x0x_1x0x_1x0x_... = 0x8888_8888_0000_0000, 0 - stride = 4: binary 1xxx_0xxx_1xxx_0xxxx = 0x8080_8080_8080_8080, 0 - - For result = 0xaaaa_aaaa_0000_0000, use: - stride = 2: source = 0x8888_8888_8888_8888, 0x0 } - stride = 4: source = { 0x8080_8080_8080_8080, 0x8080_8080_8080_8080 } - */ - - /* The last array element appears in the left-most (first) bit - positions of the vector register. */ - vector unsigned char source_a = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x88, 0x88, 0x88, 0x88 }; - vector unsigned char source_b = { - 0, 0, 0, 0, 0, 0, 0, 0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 }; - vector unsigned char source_c = { - 0, 0, 0, 0, 0, 0, 0, 0, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88 }; - vector unsigned char source_d = { - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 }; - - unsigned long long int results [] = - { 0xaaaa000000000000ull, 0xaaaa000000000000ull, - 0xaaaaaaaa00000000ull, 0xaaaaaaaa00000000ull }; - - if (do_vec_gnb (source_a, 2) != results [0]) - abort (); - if (do_vec_gnb (source_b, 4) != results [1]) - abort (); - if (do_vec_gnb (source_c, 2) != results [2]) - abort (); - if (do_vec_gnb (source_d, 4) != results [3]) - abort (); - - return 0; -} - |