6 vector
unsigned char vuca
= {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
7 vector
unsigned char vucb
8 = {16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31};
9 vector
unsigned char vucp
= {0,31,1,30,2,29,3,28,4,27,5,26,6,25,7,24};
11 vector
signed char vsca
12 = {-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1};
13 vector
signed char vscb
= {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
14 vector
unsigned char vscp
= {0,31,1,30,2,29,3,28,4,27,5,26,6,25,7,24};
16 vector
unsigned short vusa
= {0,1,2,3,4,5,6,7};
17 vector
unsigned short vusb
= {8,9,10,11,12,13,14,15};
18 vector
unsigned char vusp
= {0,1,30,31,2,3,28,29,4,5,26,27,6,7,24,25};
20 vector
signed short vssa
= {-8,-7,-6,-5,-4,-3,-2,-1};
21 vector
signed short vssb
= {0,1,2,3,4,5,6,7};
22 vector
unsigned char vssp
= {0,1,30,31,2,3,28,29,4,5,26,27,6,7,24,25};
24 vector
unsigned int vuia
= {0,1,2,3};
25 vector
unsigned int vuib
= {4,5,6,7};
26 vector
unsigned char vuip
= {0,1,2,3,28,29,30,31,4,5,6,7,24,25,26,27};
28 vector
signed int vsia
= {-4,-3,-2,-1};
29 vector
signed int vsib
= {0,1,2,3};
30 vector
unsigned char vsip
= {0,1,2,3,28,29,30,31,4,5,6,7,24,25,26,27};
32 vector
float vfa
= {-4.0,-3.0,-2.0,-1.0};
33 vector
float vfb
= {0.0,1.0,2.0,3.0};
34 vector
unsigned char vfp
= {0,1,2,3,28,29,30,31,4,5,6,7,24,25,26,27};
37 vector
unsigned char vuc
;
38 vector
signed char vsc
;
39 vector
unsigned short vus
;
40 vector
signed short vss
;
41 vector
unsigned int vui
;
42 vector
signed int vsi
;
45 /* Expected result vectors. */
46 vector
unsigned char vucr
= {0,31,1,30,2,29,3,28,4,27,5,26,6,25,7,24};
47 vector
signed char vscr
= {-16,15,-15,14,-14,13,-13,12,-12,11,-11,10,-10,9,-9,8};
48 vector
unsigned short vusr
= {0,15,1,14,2,13,3,12};
49 vector
signed short vssr
= {-8,7,-7,6,-6,5,-5,4};
50 vector
unsigned int vuir
= {0,7,1,6};
51 vector
signed int vsir
= {-4,3,-3,2};
52 vector
float vfr
= {-4.0,3.0,-3.0,2.0};
54 vuc
= vec_perm (vuca
, vucb
, vucp
);
55 vsc
= vec_perm (vsca
, vscb
, vscp
);
56 vus
= vec_perm (vusa
, vusb
, vusp
);
57 vss
= vec_perm (vssa
, vssb
, vssp
);
58 vui
= vec_perm (vuia
, vuib
, vuip
);
59 vsi
= vec_perm (vsia
, vsib
, vsip
);
60 vf
= vec_perm (vfa
, vfb
, vfp
);
62 check (vec_all_eq (vuc
, vucr
), "vuc");
63 check (vec_all_eq (vsc
, vscr
), "vsc");
64 check (vec_all_eq (vus
, vusr
), "vus");
65 check (vec_all_eq (vss
, vssr
), "vss");
66 check (vec_all_eq (vui
, vuir
), "vui");
67 check (vec_all_eq (vsi
, vsir
), "vsi");
68 check (vec_all_eq (vf
, vfr
), "vf" );