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_a3 asm("a3") = a3;
|
||||||
register sbiword_t r_a4 asm("a4") = a4;
|
register sbiword_t r_a4 asm("a4") = a4;
|
||||||
register sbiword_t r_a5 asm("a5") = a5;
|
register sbiword_t r_a5 asm("a5") = a5;
|
||||||
asm volatile("ecall" : // Instruction
|
asm volatile(
|
||||||
"=r"(r_a0), "=r"(r_a1) : // Inputs
|
"ecall" :
|
||||||
"r"(r_a7), "r"(r_a6), // Outputs
|
"=r"(r_a0), "=r"(r_a1) :
|
||||||
"r"(r_a0), "r"(r_a1), "r"(r_a2),
|
"r"(r_a0), "r"(r_a1), "r"(r_a2), "r"(r_a3),
|
||||||
"r"(r_a3), "r"(r_a4), "r"(r_a5));
|
"r"(r_a4), "r"(r_a5), "r"(r_a7), "r"(r_a6));
|
||||||
return {.error = r_a0, .value = r_a1};
|
return {.error = r_a0, .value = r_a1};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue