File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,12 +29,11 @@ core::arch::global_asm!(
2929 mrs r0, spsr // Load processor status that was banked on entry
3030 tst r0, {t_bit} // SVC occurred from Thumb state?
3131 beq 1f
32- ldrh r0, [lr,#-2] // Yes: Load halfword and...
33- bic r0, r0, #0xFF00 // ...r0 now contains SVC number
32+ ldrb r0, [lr,#-2] // Yes: Load 1-byte immediate
3433 b 2f
3534 1:
3635 ldr r0, [lr,#-4] // No: Load word and...
37- bic r0, r0, #0xFF000000 // ...r0 now contains SVC number
36+ bic r0, r0, #0xFF000000 // ...extract 3-byte immediate
3837 2:
3938 mov r1, r12 // pass the stacked integer registers in r1
4039 bl _svc_handler
Original file line number Diff line number Diff line change @@ -26,10 +26,9 @@ core::arch::global_asm!(
2626 r#"
2727 mrs r0, spsr // Load processor status that was banked on entry
2828 tst r0, {t_bit} // SVC occurred from Thumb state?
29- ldrhne r0, [lr,#-2] // Yes: Load halfword and...
30- bicne r0, r0, #0xFF00 // ...extract comment field
29+ ldrbne r0, [lr,#-2] // Yes: Load 1-byte immediate
3130 ldreq r0, [lr,#-4] // No: Load word and...
32- biceq r0, r0, #0xFF000000 // ...extract comment field
31+ biceq r0, r0, #0xFF000000 // ...extract 3-byte immediate
3332 mov r1, r12 // pass the stacked integer registers in r1
3433 bl _svc_handler
3534 mov lr, r0 // move r0 out of the way - restore_fpu_context will trash it
You can’t perform that action at this time.
0 commit comments