diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/cortex-m/panic.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/core/cortex-m/panic.c b/core/cortex-m/panic.c index fd80061b95..d8e82a4e5d 100644 --- a/core/cortex-m/panic.c +++ b/core/cortex-m/panic.c @@ -363,7 +363,6 @@ void exception_panic(void) { /* Save registers and branch directly to panic handler */ asm volatile( - "mov r0, %[pregs]\n" "mrs r1, psp\n" "mrs r2, ipsr\n" "mov r3, sp\n" @@ -394,7 +393,7 @@ void exception_panic(void) "mov r10, #0\n" "mov r11, #0\n" #endif - "stmia r0, {r1-r11, lr}\n" + "stmia %[pregs], {r1-r11, lr}\n" "mov sp, %[pstack]\n" "bl report_panic\n" : : [pregs] "r" (pdata_ptr->cm.regs), |