Skip to content

Commit eeeef01

Browse files
committed
std: valgrind client request support for aarch64
1 parent 4f04759 commit eeeef01

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

lib/std/valgrind.zig

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,23 @@ pub fn doClientRequest(default: usize, request: usize, a1: usize, a2: usize, a3:
3030
: "cc", "memory"
3131
);
3232
},
33+
.aarch64 => {
34+
return asm volatile (
35+
\\ mov x3, %[default]
36+
\\ mov x4, %[ptr]
37+
\\ ror x12, x12, #3 ; ror x12, x12, #13
38+
\\ ror x12, x12, #51 ; ror x12, x12, #61
39+
\\ orr x10, x10, x10
40+
\\ mov %[ret], x3
41+
: [ret] "=r" (-> usize),
42+
: [default] "r" (default),
43+
[ptr] "r" (&[_]usize{ request, a1, a2, a3, a4, a5 }),
44+
: "cc", "memory", "x3", "x4"
45+
);
46+
},
3347
// ppc32
3448
// ppc64
3549
// arm
36-
// arm64
3750
// s390x
3851
// mips32
3952
// mips64

0 commit comments

Comments
 (0)