diff --git a/arch/risc-v/include/rv64gc/syscall.h b/arch/risc-v/include/rv64gc/syscall.h index f6f3d71063..d35280990c 100644 --- a/arch/risc-v/include/rv64gc/syscall.h +++ b/arch/risc-v/include/rv64gc/syscall.h @@ -158,6 +158,7 @@ static inline uintptr_t sys_call0(unsigned int nbr) ( "ecall" :: "r"(r0) + : "memory" ); asm volatile("nop" : "=r"(r0)); @@ -182,6 +183,7 @@ static inline uintptr_t sys_call1(unsigned int nbr, uintptr_t parm1) ( "ecall" :: "r"(r0), "r"(r1) + : "memory" ); asm volatile("nop" : "=r"(r0)); @@ -208,6 +210,7 @@ static inline uintptr_t sys_call2(unsigned int nbr, uintptr_t parm1, ( "ecall" :: "r"(r0), "r"(r1), "r"(r2) + : "memory" ); asm volatile("nop" : "=r"(r0)); @@ -235,6 +238,7 @@ static inline uintptr_t sys_call3(unsigned int nbr, uintptr_t parm1, ( "ecall" :: "r"(r0), "r"(r1), "r"(r2), "r"(r3) + : "memory" ); asm volatile("nop" : "=r"(r0)); @@ -264,6 +268,7 @@ static inline uintptr_t sys_call4(unsigned int nbr, uintptr_t parm1, ( "ecall" :: "r"(r0), "r"(r1), "r"(r2), "r"(r3), "r"(r4) + : "memory" ); asm volatile("nop" : "=r"(r0)); @@ -294,6 +299,7 @@ static inline uintptr_t sys_call5(unsigned int nbr, uintptr_t parm1, ( "ecall" :: "r"(r0), "r"(r1), "r"(r2), "r"(r3), "r"(r4), "r"(r5) + : "memory" ); asm volatile("nop" : "=r"(r0)); @@ -326,6 +332,7 @@ static inline uintptr_t sys_call6(unsigned int nbr, uintptr_t parm1, ( "ecall" :: "r"(r0), "r"(r1), "r"(r2), "r"(r3), "r"(r4), "r"(r5), "r"(r6) + : "memory" ); asm volatile("nop" : "=r"(r0));