Skip to content

Commit 20d4477

Browse files
committed
Fix inline assembly.
1 parent 0b51fee commit 20d4477

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cortex-m-rt/src/lib.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ global_asm!(
456456
.cfi_startproc
457457
HardFaultTrampoline:",
458458
"mov r0, lr
459-
movs r1, #4
459+
mov r1, #4
460460
tst r0, r1
461461
bne 0f
462462
mrs r0, MSP
@@ -548,7 +548,7 @@ cfg_global_asm! {
548548
ldr r1, =__edata
549549
ldr r2, =__sidata
550550
2:
551-
cmp r0, r0
551+
cmp r1, r0
552552
beq 3f
553553
ldm r2!, {{r3}}
554554
stm r0!, {{r3}}
@@ -569,7 +569,8 @@ cfg_global_asm! {
569569

570570
// Push `lr` to the stack for debuggers, to prevent them unwinding past Reset.
571571
// See https://sourceware.org/binutils/docs/as/CFI-directives.html.
572-
".cfi_def_cfa sp, 0
572+
"4:
573+
.cfi_def_cfa sp, 0
573574
push {{lr}}
574575
.cfi_offset lr, 0",
575576

0 commit comments

Comments
 (0)