Skip to content

Commit

Permalink
Merge pull request tock#4311 from tock/arm-asm-bitset
Browse files Browse the repository at this point in the history
arm: replace two asm instructions with one equivalent
  • Loading branch information
hudson-ayers authored Jan 18, 2025
2 parents dd1eaa1 + 12c5666 commit 3f58fdb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/cortex-v7m/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ core::arch::global_asm!(
// The link register is set to the `EXC_RETURN` value on exception entry. To
// ensure we execute using the process stack we set the SPSEL bit to 1
// to use the alternate (process) stack.
mov r0, #1 // r0 = 1
bfi lr, r0, #2, #1 // LR = LR | (0x1<<2)
orr lr, lr, #4 // LR = LR | 0b100
// Switch to the app.
bx lr
Expand Down

0 comments on commit 3f58fdb

Please sign in to comment.