summaryrefslogtreecommitdiff
path: root/core/riscv-rv32i/panic.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/riscv-rv32i/panic.c')
-rw-r--r--core/riscv-rv32i/panic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/riscv-rv32i/panic.c b/core/riscv-rv32i/panic.c
index 3d8cec1b06..b339fdf76c 100644
--- a/core/riscv-rv32i/panic.c
+++ b/core/riscv-rv32i/panic.c
@@ -41,8 +41,8 @@ static const char * const exc_type[16] = {
void software_panic(uint32_t reason, uint32_t info)
{
- asm volatile ("mv s0, %0" : : "r"(reason));
- asm volatile ("mv s1, %0" : : "r"(info));
+ asm volatile ("mv s0, %0" : : "r"(reason) : "s0");
+ asm volatile ("mv s1, %0" : : "r"(info) : "s1");
if (in_interrupt_context())
asm("j excep_handler");
else