Add missing zstd.h to coregrind Makefile.am noinst_HEADERS
[valgrind.git] / memcheck / tests / s390x / cli.c
blob479ad894208247fb51d6374c2601a17f1dc456de
1 #include <stdlib.h>
3 volatile unsigned long tmp;
4 static const char use_idx[] = "01234567890abcdefghijklmnopqrstuvwxyz";
6 static void depend_on(int val) { tmp = use_idx[val]; }
8 static void pretend_write(unsigned long* val) { __asm__("" : "=m"(*val) : :); }
10 static void do_compares(unsigned long value)
12 unsigned char val1 = value & 0xff;
13 int result = 0;
15 __asm__("cli %[val],0x20\n\t"
16 "jl 1f\n\t"
17 "lghi %[res],1\n\t"
18 "1: nopr 0"
19 : [res] "+d"(result)
20 : [val] "Q"(val1)
21 :);
22 depend_on(result);
24 __asm__("cli %[val],0x40\n\t"
25 "jnl 1f\n\t"
26 "lghi %[res],2\n\t"
27 "1: nopr 0"
28 : [res] "+d"(result)
29 : [val] "Q"(val1)
30 :);
31 depend_on(result);
34 int main()
36 unsigned long* buf = malloc(sizeof(unsigned long));
37 pretend_write(buf);
38 do_compares(*buf & 0x3f);
39 free(buf);
40 return 0;