osdep: protect qemu/osdep.h with extern "C"
[qemu/ar7.git] / tests / tcg / i386 / test-i386-pcmpistri.c
blob1e81ae611acfc5ea9cf3309a192d94cc0b8b9308
1 /* Test pcmpistri instruction. */
3 #include <nmmintrin.h>
4 #include <stdio.h>
6 union u {
7 __m128i x;
8 unsigned char uc[16];
9 };
11 union u s0 = { .uc = { 0 } };
12 union u s1 = { .uc = "abcdefghijklmnop" };
13 union u s2 = { .uc = "bcdefghijklmnopa" };
14 union u s3 = { .uc = "bcdefghijklmnab" };
16 int
17 main(void)
19 int ret = 0;
20 if (_mm_cmpistri(s0.x, s0.x, 0x4c) != 15) {
21 printf("FAIL: pcmpistri test 1\n");
22 ret = 1;
24 if (_mm_cmpistri(s1.x, s2.x, 0x4c) != 15) {
25 printf("FAIL: pcmpistri test 2\n");
26 ret = 1;
28 if (_mm_cmpistri(s1.x, s3.x, 0x4c) != 16) {
29 printf("FAIL: pcmpistri test 3\n");
30 ret = 1;
32 return ret;