Cleaned up ecall asm volatile
This commit is contained in:
parent
b78b3f5763
commit
9023bb8d60
1 changed files with 5 additions and 5 deletions
|
@ -20,11 +20,11 @@ namespace opensbi {
|
|||
register sbiword_t r_a3 asm("a3") = a3;
|
||||
register sbiword_t r_a4 asm("a4") = a4;
|
||||
register sbiword_t r_a5 asm("a5") = a5;
|
||||
asm volatile("ecall" : // Instruction
|
||||
"=r"(r_a0), "=r"(r_a1) : // Inputs
|
||||
"r"(r_a7), "r"(r_a6), // Outputs
|
||||
"r"(r_a0), "r"(r_a1), "r"(r_a2),
|
||||
"r"(r_a3), "r"(r_a4), "r"(r_a5));
|
||||
asm volatile(
|
||||
"ecall" :
|
||||
"=r"(r_a0), "=r"(r_a1) :
|
||||
"r"(r_a0), "r"(r_a1), "r"(r_a2), "r"(r_a3),
|
||||
"r"(r_a4), "r"(r_a5), "r"(r_a7), "r"(r_a6));
|
||||
return {.error = r_a0, .value = r_a1};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue