From ea67dad245a7dd2e849b69d94d61c92bd859de2b Mon Sep 17 00:00:00 2001 From: Benjamin Levy Date: Thu, 20 Jun 2024 12:40:26 -0400 Subject: [PATCH] Fix igloo_hypercall2 on aarch64 Since x0 was stated twice in the register reads/writes section, both %0 and %1 pointed to x0. --- hypercall.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/hypercall.h b/hypercall.h index 187719f..ce6df76 100644 --- a/hypercall.h +++ b/hypercall.h @@ -58,13 +58,9 @@ static inline unsigned long igloo_hypercall2(unsigned long num, unsigned long ar register unsigned long long x2 asm("x2") = arg2; asm volatile( - "mov x0, %0 \t\n\ - mov x1, %1 \t\n\ - mov x2, %2 \t\n\ - msr S0_0_c5_c0_0, xzr \t\n\ - mov %0, x0\t\n" - : "=g"(x0) - : "r"(x0), "r"(x1), "r"(x2) + "msr S0_0_c5_c0_0, xzr" + : "+r"(x0) + : "r"(x1), "r"(x2) : );