mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Fix return address when data_abort_handler skips faulting instruction.
When writing a value to PC, execution continues at that location, so subtracting 4 returns to the next instruction. Previously, two instructions after the faulting instruction were being skipped, causing safe_read functions to return true even if a data abort happened. Change-Id: I3fd02d54646323ea2050d0504e38f6d22f09c749
This commit is contained in:
parent
9b65f8e658
commit
4077eac839
1 changed files with 1 additions and 1 deletions
|
@ -137,6 +137,6 @@ data_abort_handler:
|
||||||
@ restore registers
|
@ restore registers
|
||||||
ldmfd sp!, {r0-r1}
|
ldmfd sp!, {r0-r1}
|
||||||
@ restore mode and jump back to the *next* instruction
|
@ restore mode and jump back to the *next* instruction
|
||||||
subs pc, lr, #-4
|
subs pc, lr, #4
|
||||||
.size data_abort_handler, . - data_abort_handler
|
.size data_abort_handler, . - data_abort_handler
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue