Skip to content

Commit

Permalink
Fix igloo_hypercall2 on aarch64
Browse files Browse the repository at this point in the history
Since x0 was stated twice in the register reads/writes section,
both %0 and %1 pointed to x0.
  • Loading branch information
be32826 committed Jun 20, 2024
1 parent 2d90912 commit ea67dad
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions hypercall.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
:
);

Expand Down

0 comments on commit ea67dad

Please sign in to comment.