1
0
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:
Marian Buschsieweke 2021-01-23 17:42:45 +01:00 committed by GitHub
commit ca94d80ac8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"
);
}