mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-10 05:35:20 -05:00
Sansa AMS: call the exception handler with the correct address when the exception happened in Thumb state
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26818 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
a331e0d3fb
commit
646a999e35
1 changed files with 6 additions and 1 deletions
|
|
@ -181,7 +181,12 @@ newstart:
|
|||
* we're in. Second parameter is exception number, used for a string lookup
|
||||
* in UIE. */
|
||||
undef_instr_handler:
|
||||
sub r0, lr, #4
|
||||
sub r0, lr, #4 @ r0 points to the faulty ARM instruction
|
||||
#ifdef USE_THUMB
|
||||
mrs r1, spsr
|
||||
tst r1, #(1<<5) @ T bit set ?
|
||||
subne r0, lr, #2 @ if yes, r0 points to the faulty THUMB instruction
|
||||
#endif /* USE_THUMB */
|
||||
mov r1, #0
|
||||
b UIE
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue