mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-26 15:03:53 +01:00
Merge pull request #15837 from bergzand/pr/fe310/ecall_cleanup
cpu/fe310: Mark registers as clobbered and allow using immediates for values
This commit is contained in:
commit
ca94d80ac8
@ -33,12 +33,12 @@ static inline void _ecall_dispatch(uint32_t num, void *ctx)
|
||||
{
|
||||
/* function arguments are in a0 and a1 as per ABI */
|
||||
__asm__ volatile (
|
||||
"mv a0, %[num] \n"
|
||||
"mv a1, %[ctx] \n"
|
||||
"add a0, x0, %[num] \n"
|
||||
"add a1, x0, %[ctx] \n"
|
||||
"ECALL\n"
|
||||
: /* No outputs */
|
||||
: [num] "r" (num), [ctx] "r" (ctx)
|
||||
: "memory"
|
||||
: "memory", "a0", "a1"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user