1 /* zArchitecture specifies that operation exception(illegal opcode) is
2 suppressing. That means that the program check old psw will point to
3 the instruction after the illegal one (according to the calculated length).
4 There are some programs out there that use this mechanism to detect available
6 This patch checks, that valgrind makes forard progress. */
10 static volatile int got_ill
;
11 static void handle_ill(int sig
)
19 memset(&sa
, 0, sizeof(sa
));
20 sa
.sa_handler
= handle_ill
;
21 sigaction(SIGILL
, &sa
, NULL
);
24 /* most architectures loop here, but on s390 this would increase the
25 PSW by 2 and then by 2 */
26 asm volatile(".insn e,0x0000\n\t.insn e,0x0000");
28 printf("0x00000000 does not loop\n");
31 /* most architectures loop here, but on s390 this would increase the
32 PSW by 6 and then by 2*/
33 asm volatile(".insn ril,0xffffffffffff,0xf,.-2\n\t.insn e,0x0000");
35 printf("0xffffffff does not loop\n");