comparison gcc/testsuite/gcc.target/powerpc/vec-stril_p-3.c @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
comparison
equal deleted inserted replaced
145:1830386684a0 152:2b5abeee2509
1 /* { dg-do run } */
2 /* { dg-require-effective-target powerpc_future_hw } */
3 /* { dg-options "-mdejagnu-cpu=future" } */
4
5 #include <altivec.h>
6
7 extern void abort (void);
8
9 /* Vector string isolate right-justified on array of signed char. */
10 int
11 silj_p (vector signed char arg)
12 {
13 return vec_stril_p (arg);
14 }
15
16 int main (int argc, char *argv [])
17 {
18 vector signed char input1 =
19 { 0x1, 0x2, 0xf3, 0x4, 0x5, 0x6, 0x7, 0x8,
20 0x9, 0xa, 0xb, 0xc, 0xd, 0xe2, 0xf, 0x11 };
21 vector signed char input2 =
22 { 0x1, 0x2, 0xf3, 0x4, 0x5, 0x6, 0x7, 0x8,
23 0x9, 0xa, 0xb, 0xc, 0xd, 0x0, 0xf, 0x11 };
24 vector signed char input3 =
25 { 0x1, 0x2, 0xf3, 0x0, 0x5, 0x6, 0x7, 0x8,
26 0x9, 0xa, 0xb, 0xc, 0xd, 0xe2, 0x0, 0x11 };
27 vector signed char input4 =
28 { 0x1, 0x2, 0xf3, 0x4, 0x5, 0x6, 0x7, 0x8,
29 0x9, 0xa, 0xb, 0xc, 0xd, 0xe2, 0x0, 0x11 };
30
31 if (silj_p (input1))
32 abort ();
33 if (!silj_p (input2))
34 abort ();
35 if (!silj_p (input3))
36 abort ();
37 if (!silj_p (input4))
38 abort ();
39
40 }