Skip to content

Commit

Permalink
Push and pop registers in system mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
Anders429 committed Sep 16, 2024
1 parent 30ad113 commit 6f4aef7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/asm_runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ core::arch::global_asm! {
"ldr r12, [r12]",
bracer::when!(("r12" != "#0")[1] {
bracer::a32_read_spsr_to!("r3"),
"push {{r3, lr}}",
bracer::a32_set_cpu_control!(System, irq_masked = true, fiq_masked = true),
"push {{r3, lr}}",
bracer::a32_fake_blx!("r12"),
bracer::a32_set_cpu_control!(IRQ, irq_masked = true, fiq_masked = true),
"pop {{r3, lr}}",
bracer::a32_set_cpu_control!(IRQ, irq_masked = true, fiq_masked = true),
bracer::a32_write_spsr_from!("r3"),
}),

Expand Down

0 comments on commit 6f4aef7

Please sign in to comment.