Skip to content

Commit

Permalink
Fix inline assembly.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed Apr 22, 2022
1 parent 0b51fee commit 20d4477
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cortex-m-rt/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ global_asm!(
.cfi_startproc
HardFaultTrampoline:",
"mov r0, lr
movs r1, #4
mov r1, #4
tst r0, r1
bne 0f
mrs r0, MSP
Expand Down Expand Up @@ -548,7 +548,7 @@ cfg_global_asm! {
ldr r1, =__edata
ldr r2, =__sidata
2:
cmp r0, r0
cmp r1, r0
beq 3f
ldm r2!, {{r3}}
stm r0!, {{r3}}
Expand All @@ -569,7 +569,8 @@ cfg_global_asm! {

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

Expand Down

0 comments on commit 20d4477

Please sign in to comment.