Add missing zstd.h to coregrind Makefile.am noinst_HEADERS
[valgrind.git] / memcheck / tests / amd64 / rh2257546_128.c
blob973fcdbfabee8d64972e8927e02634769d9715f3
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(16);
15 c1[0] = 'x'; c1[1] = 'y'; c1[2] = 'x'; c1[3] = 0;
17 char* c2 = "foobarxyzzyfoobarzyzzy"; // strlen > 16
19 long long int res;
20 __asm__ __volatile__(
21 "movdqu (%1), %%xmm4" "\n\t"
22 "movdqu (%2), %%xmm5" "\n\t"
23 "pxor %%xmm4, %%xmm5" "\n\t"
24 "ptest %%xmm5, %%xmm5" "\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*/"xmm4","xmm5","cc"
33 printf("res = %lld\n", res);
34 free(c1);
35 return 0;