vmnet: stop recieving events when VM is stopped
[qemu/armbru.git] / tests / tcg / s390x / csst.c
blob084d80af49f3393733b4309409ae6e532f7627bc
1 #include <stdint.h>
2 #include <unistd.h>
4 int main(void)
6 uint64_t parmlist[] __attribute__((aligned(16))) = {
7 0xfedcba9876543210ull,
8 0,
9 0x7777777777777777ull,
12 uint64_t op1 = 0x0123456789abcdefull;
13 uint64_t op2 = 0;
14 uint64_t op3 = op1;
15 uint64_t cc;
17 asm volatile(
18 " lghi %%r0,%[flags]\n"
19 " la %%r1,%[parmlist]\n"
20 " csst %[op1],%[op2],%[op3]\n"
21 " ipm %[cc]\n"
22 : [op1] "+m" (op1),
23 [op2] "+m" (op2),
24 [op3] "+r" (op3),
25 [cc] "=r" (cc)
26 : [flags] "K" (0x0301),
27 [parmlist] "m" (parmlist)
28 : "r0", "r1", "cc", "memory");
29 cc = (cc >> 28) & 3;
30 if (cc) {
31 write(1, "bad cc\n", 7);
32 return 1;
34 if (op1 != parmlist[0]) {
35 write(1, "bad op1\n", 8);
36 return 1;
38 if (op2 != parmlist[2]) {
39 write(1, "bad op2\n", 8);
40 return 1;
42 return 0;