1 /* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
5 static unsigned char svuc
[16] __attribute__ ((aligned (16)));
6 static signed char svsc
[16] __attribute__ ((aligned (16)));
7 static unsigned short svus
[8] __attribute__ ((aligned (16)));
8 static signed short svss
[8] __attribute__ ((aligned (16)));
9 static unsigned int svui
[4] __attribute__ ((aligned (16)));
10 static signed int svsi
[4] __attribute__ ((aligned (16)));
11 static float svf
[4] __attribute__ ((aligned (16)));
16 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
17 for (i
= 15; i
>= 0; --i
)
19 for (i
= 0; i
< 16; ++i
)
25 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
26 for (i
= 7; i
>= 0; --i
)
28 for (i
= 0; i
< 8; ++i
)
34 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
35 for (i
= 3; i
>= 0; --i
)
37 for (i
= 0; i
< 4; ++i
)
48 vector
unsigned char vuc
;
49 vector
signed char vsc
;
50 vector
unsigned short vus
;
51 vector
signed short vss
;
52 vector
unsigned int vui
;
53 vector
signed int vsi
;
58 vuc
= vec_lde (9*1, (unsigned char *)svuc
);
59 vsc
= vec_lde (14*1, (signed char *)svsc
);
60 vus
= vec_lde (7*2, (unsigned short *)svus
);
61 vss
= vec_lde (1*2, (signed short *)svss
);
62 vui
= vec_lde (3*4, (unsigned int *)svui
);
63 vsi
= vec_lde (2*4, (signed int *)svsi
);
64 vf
= vec_lde (0*4, (float *)svf
);
66 check (vec_extract (vuc
, 9) == 9, "vuc");
67 check (vec_extract (vsc
, 14) == 6, "vsc");
68 check (vec_extract (vus
, 7) == 7, "vus");
69 check (vec_extract (vss
, 1) == -3, "vss");
70 check (vec_extract (vui
, 3) == 3, "vui");
71 check (vec_extract (vsi
, 2) == 0, "vsi");
72 check (vec_extract (vf
, 0) == 0.0, "vf");