10 void sigsegv(int sig
, siginfo_t
*info
, void *vuc
)
14 assert(info
->si_addr
== expected
);
15 uc
->uc_mcontext
.pc
+= 4;
20 struct sigaction sa
= {
21 .sa_sigaction
= sigsegv
,
22 .sa_flags
= SA_SIGINFO
28 if (sigaction(SIGSEGV
, &sa
, NULL
) < 0) {
33 page
= mmap(0, getpagesize(), PROT_NONE
, MAP_PRIVATE
| MAP_ANON
, -1, 0);
34 if (page
== MAP_FAILED
) {
40 expected
= page
+ ofs
;
42 asm("ptrue p0.d, vl1\n\t"
44 "ldnt1h {z1.d}, p0/z, [z0.d, %1]\n\t"
46 "ldnt1h {z0.d}, p0/z, [z1.d, %0]"
47 : : "r"(page
), "r"(ofs
) : "v0", "v1");