Skip to content

Commit 17b1a3e

Browse files
committed
cortex-m-rt: Remove LR push, to ensure the stack is 8-byte aligned.
This was causing incorrect execution of code optimized with the assumption the stack is 8-byte aligned.
1 parent 9d63aa9 commit 17b1a3e

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

cortex-m-rt/src/lib.rs

-6
Original file line numberDiff line numberDiff line change
@@ -572,12 +572,6 @@ cfg_global_asm! {
572572
dsb
573573
isb",
574574

575-
// Push `lr` to the stack for debuggers, to prevent them unwinding past Reset.
576-
// See https://sourceware.org/binutils/docs/as/CFI-directives.html.
577-
".cfi_def_cfa sp, 0
578-
push {{lr}}
579-
.cfi_offset lr, 0",
580-
581575
// Jump to user main function.
582576
// `bl` is used for the extended range, but the user main function should not return,
583577
// so trap on any unexpected return.

0 commit comments

Comments
 (0)