Add missing zstd.h to coregrind Makefile.am noinst_HEADERS
[valgrind.git] / memcheck / tests / amd64 / rh2257546_256.c
blob4b522c7e46ff8a9eb292a0f2872e41279e55ec69
2 // This should run on memcheck without reporting an undef-value error.
3 // See https://bugzilla.redhat.com/show_bug.cgi?id=2257546
5 #include <stdio.h>
6 #if defined(__APPLE__)
7 #include <stdlib.h>
8 #else
9 #include <malloc.h>
10 #endif
12 int main ( void )
14 char* c1 = malloc(32);
15 c1[0] = 'x'; c1[1] = 'y'; c1[2] = 'x'; c1[3] = 0;
17 char* c2 = "foobarxyzzyfoobarzyzzyandawholelotmoretoo"; // strlen > 32
19 long long int res;
20 __asm__ __volatile__(
21 "vmovdqu (%1), %%ymm4" "\n\t"
22 "vmovdqu (%2), %%ymm5" "\n\t"
23 "vpxor %%ymm4, %%ymm5, %%ymm5" "\n\t"
24 "vptest %%ymm5, %%ymm5" "\n\t"
25 "je zzz1f" "\n\t"
26 "mov $99, %0" "\n\t"
27 "jmp zzzafter" "\n"
28 "zzz1f:" "\n\t"
29 "mov $88, %0" "\n"
30 "zzzafter:" "\n\t"
31 : /*OUT*/"=r"(res) : /*IN*/"r"(c1),"r"(c2) : /*TRASH*/"ymm4","ymm5","cc"
33 printf("res = %lld\n", res);
34 free(c1);
35 return 0;