diff options
author | Boris Gjenero <boris.gjenero@gmail.com> | 2013-05-23 19:31:33 -0400 |
---|---|---|
committer | Boris Gjenero <boris.gjenero@gmail.com> | 2013-05-23 19:51:19 -0400 |
commit | 4077eac8398345d3500be794190eec83852135ba (patch) | |
tree | 6bd984a3cd967250b212b804c4e8b4d793b002df /lib/unwarminder | |
parent | 9b65f8e658768b14ae917341f57d774f729447fe (diff) | |
download | rockbox-4077eac8398345d3500be794190eec83852135ba.tar.gz rockbox-4077eac8398345d3500be794190eec83852135ba.zip |
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
Diffstat (limited to 'lib/unwarminder')
-rw-r--r-- | lib/unwarminder/safe_read.S | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/unwarminder/safe_read.S b/lib/unwarminder/safe_read.S index d18bf49c04..1969c7e0c6 100644 --- a/lib/unwarminder/safe_read.S +++ b/lib/unwarminder/safe_read.S | |||
@@ -137,6 +137,6 @@ data_abort_handler: | |||
137 | @ restore registers | 137 | @ restore registers |
138 | ldmfd sp!, {r0-r1} | 138 | ldmfd sp!, {r0-r1} |
139 | @ restore mode and jump back to the *next* instruction | 139 | @ restore mode and jump back to the *next* instruction |
140 | subs pc, lr, #-4 | 140 | subs pc, lr, #4 |
141 | .size data_abort_handler, . - data_abort_handler | 141 | .size data_abort_handler, . - data_abort_handler |
142 | #endif | 142 | #endif |