mirror of
git://git.musl-libc.org/musl
synced 2025-03-05 19:27:27 +00:00
fix riscv64 syscall asm constraint
having "+r"(a0) is redundant with "0"(a0) in syscalls with at least 1 arg, which is arguably a constraint violation (clang treats it as such), and an invalid input with indeterminate value in the 0-arg case. use the "=r"(a0) form instead.
This commit is contained in:
parent
1a28c6eade
commit
8eb49e0485
@ -3,7 +3,7 @@
|
||||
|
||||
#define __asm_syscall(...) \
|
||||
__asm__ __volatile__ ("ecall\n\t" \
|
||||
: "+r"(a0) : __VA_ARGS__ : "memory"); \
|
||||
: "=r"(a0) : __VA_ARGS__ : "memory"); \
|
||||
return a0; \
|
||||
|
||||
static inline long __syscall0(long n)
|
||||
|
Loading…
Reference in New Issue
Block a user