aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/spu/cpat-1.c
diff options
context:
space:
mode:
authorBen Cheng <bccheng@google.com>2014-03-26 05:37:19 (GMT)
committerBen Cheng <bccheng@google.com>2014-03-26 05:37:19 (GMT)
commit1bc5aee63eb72b341f506ad058502cd0361f0d10 (patch)
treec607e8252f3405424ff15bc2d00aa38dadbb2518 /gcc-4.9/gcc/testsuite/gcc.target/spu/cpat-1.c
parent283a0bf58fcf333c58a2a92c3ebbc41fb9eb1fdb (diff)
downloadtoolchain_gcc-1bc5aee63eb72b341f506ad058502cd0361f0d10.zip
toolchain_gcc-1bc5aee63eb72b341f506ad058502cd0361f0d10.tar.gz
toolchain_gcc-1bc5aee63eb72b341f506ad058502cd0361f0d10.tar.bz2
Initial checkin of GCC 4.9.0 from trunk (r208799).
Change-Id: I48a3c08bb98542aa215912a75f03c0890e497dba
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/spu/cpat-1.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/spu/cpat-1.c104
1 files changed, 104 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/spu/cpat-1.c b/gcc-4.9/gcc/testsuite/gcc.target/spu/cpat-1.c
new file mode 100644
index 0000000..6fe2925
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/spu/cpat-1.c
@@ -0,0 +1,104 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -w" } */
+/* { dg-final { scan-assembler-times "lqr\t.3,.LC" 4 } } */
+/* { dg-final { scan-assembler-times "cbd\t.3,0\\(.sp\\)" 1 } } */
+/* { dg-final { scan-assembler-times "cbd\t.3,1\\(.sp\\)" 1 } } */
+/* { dg-final { scan-assembler-times "cbd\t.3,2\\(.sp\\)" 1 } } */
+/* { dg-final { scan-assembler-times "cbd\t.3,3\\(.sp\\)" 1 } } */
+/* { dg-final { scan-assembler-times "cbd\t.3,4\\(.sp\\)" 1 } } */
+/* { dg-final { scan-assembler-times "cbd\t.3,5\\(.sp\\)" 1 } } */
+/* { dg-final { scan-assembler-times "cbd\t.3,6\\(.sp\\)" 1 } } */
+/* { dg-final { scan-assembler-times "cbd\t.3,7\\(.sp\\)" 1 } } */
+/* { dg-final { scan-assembler-times "cbd\t.3,8\\(.sp\\)" 1 } } */
+/* { dg-final { scan-assembler-times "cbd\t.3,9\\(.sp\\)" 1 } } */
+/* { dg-final { scan-assembler-times "cbd\t.3,10\\(.sp\\)" 1 } } */
+/* { dg-final { scan-assembler-times "cbd\t.3,11\\(.sp\\)" 1 } } */
+/* { dg-final { scan-assembler-times "cbd\t.3,12\\(.sp\\)" 1 } } */
+/* { dg-final { scan-assembler-times "cbd\t.3,13\\(.sp\\)" 1 } } */
+/* { dg-final { scan-assembler-times "cbd\t.3,14\\(.sp\\)" 1 } } */
+/* { dg-final { scan-assembler-times "cbd\t.3,15\\(.sp\\)" 1 } } */
+/* { dg-final { scan-assembler-times "chd\t.3,0\\(.sp\\)" 1 } } */
+/* { dg-final { scan-assembler-times "chd\t.3,2\\(.sp\\)" 1 } } */
+/* { dg-final { scan-assembler-times "chd\t.3,4\\(.sp\\)" 1 } } */
+/* { dg-final { scan-assembler-times "chd\t.3,6\\(.sp\\)" 1 } } */
+/* { dg-final { scan-assembler-times "chd\t.3,8\\(.sp\\)" 1 } } */
+/* { dg-final { scan-assembler-times "chd\t.3,10\\(.sp\\)" 1 } } */
+/* { dg-final { scan-assembler-times "chd\t.3,12\\(.sp\\)" 1 } } */
+/* { dg-final { scan-assembler-times "chd\t.3,14\\(.sp\\)" 1 } } */
+/* { dg-final { scan-assembler-times "cwd\t.3,0\\(.sp\\)" 1 } } */
+/* { dg-final { scan-assembler-times "cwd\t.3,4\\(.sp\\)" 1 } } */
+/* { dg-final { scan-assembler-times "cwd\t.3,8\\(.sp\\)" 1 } } */
+/* { dg-final { scan-assembler-times "cwd\t.3,12\\(.sp\\)" 1 } } */
+/* { dg-final { scan-assembler-times "cdd\t.3,0\\(.sp\\)" 1 } } */
+/* { dg-final { scan-assembler-times "cdd\t.3,8\\(.sp\\)" 1 } } */
+
+__vector unsigned char
+not_cpat0()
+{
+ /* Contains no runs */
+ return (__vector unsigned char) {
+ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+ 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F};
+}
+
+__vector unsigned char
+not_cpat1()
+{
+ /* Includes 1 run but not in the right place. */
+ return (__vector unsigned char) {
+ 0x10, 0x02, 0x03, 0x13, 0x14, 0x15, 0x16, 0x17,
+ 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F};
+}
+
+__vector unsigned char
+not_cpat2()
+{
+ /* Includes 2 runs. */
+ return (__vector unsigned char) {
+ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+ 0x00, 0x01, 0x02, 0x03, 0x00, 0x01, 0x02, 0x03};
+}
+
+__vector unsigned char
+not_cpat3()
+{
+ /* Includes 1 incorrect run. */
+ return (__vector unsigned char) {
+ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+ 0x00, 0x01, 0x02, 0x03, 0x05, 0x06, 0x07, 0x1F};
+}
+
+__vector unsigned char cbd_0() { return (__vector unsigned char) { 0x03, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
+__vector unsigned char cbd_1() { return (__vector unsigned char) { 0x10, 0x03, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
+__vector unsigned char cbd_2() { return (__vector unsigned char) { 0x10, 0x11, 0x03, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
+__vector unsigned char cbd_3() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x03, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
+__vector unsigned char cbd_4() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x03, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
+__vector unsigned char cbd_5() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x03, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
+__vector unsigned char cbd_6() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x03, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
+__vector unsigned char cbd_7() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x03, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
+__vector unsigned char cbd_8() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x03, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
+__vector unsigned char cbd_9() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x03, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
+__vector unsigned char cbd_a() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x03, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
+__vector unsigned char cbd_b() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x03, 0x1C, 0x1D, 0x1E, 0x1F}; }
+__vector unsigned char cbd_c() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x03, 0x1D, 0x1E, 0x1F}; }
+__vector unsigned char cbd_d() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x03, 0x1E, 0x1F}; }
+__vector unsigned char cbd_e() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x03, 0x1F}; }
+__vector unsigned char cbd_f() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x03}; }
+
+__vector unsigned char chd_0() { return (__vector unsigned char) { 0x02, 0x03, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
+__vector unsigned char chd_2() { return (__vector unsigned char) { 0x10, 0x11, 0x02, 0x03, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
+__vector unsigned char chd_4() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x02, 0x03, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
+__vector unsigned char chd_6() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x02, 0x03, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
+__vector unsigned char chd_8() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x02, 0x03, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
+__vector unsigned char chd_a() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x02, 0x03, 0x1C, 0x1D, 0x1E, 0x1F}; }
+__vector unsigned char chd_c() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x02, 0x03, 0x1E, 0x1F}; }
+__vector unsigned char chd_e() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x02, 0x03}; }
+
+__vector unsigned char cwd_0() { return (__vector unsigned char) { 0x00, 0x01, 0x02, 0x03, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
+__vector unsigned char cwd_4() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x00, 0x01, 0x02, 0x03, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
+__vector unsigned char cwd_8() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x00, 0x01, 0x02, 0x03, 0x1C, 0x1D, 0x1E, 0x1F}; }
+__vector unsigned char cwd_c() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x00, 0x01, 0x02, 0x03}; }
+
+__vector unsigned char cdd_0() { return (__vector unsigned char) { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
+__vector unsigned char cdd_8() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07}; }
+