diff options
Diffstat (limited to 'firmware/target/arm')
-rw-r--r-- | firmware/target/arm/crt0.S | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/firmware/target/arm/crt0.S b/firmware/target/arm/crt0.S index 53b8a67ea1..6def9a1a88 100644 --- a/firmware/target/arm/crt0.S +++ b/firmware/target/arm/crt0.S | |||
@@ -181,7 +181,12 @@ newstart: | |||
181 | * we're in. Second parameter is exception number, used for a string lookup | 181 | * we're in. Second parameter is exception number, used for a string lookup |
182 | * in UIE. */ | 182 | * in UIE. */ |
183 | undef_instr_handler: | 183 | undef_instr_handler: |
184 | sub r0, lr, #4 | 184 | sub r0, lr, #4 @ r0 points to the faulty ARM instruction |
185 | #ifdef USE_THUMB | ||
186 | mrs r1, spsr | ||
187 | tst r1, #(1<<5) @ T bit set ? | ||
188 | subne r0, lr, #2 @ if yes, r0 points to the faulty THUMB instruction | ||
189 | #endif /* USE_THUMB */ | ||
185 | mov r1, #0 | 190 | mov r1, #0 |
186 | b UIE | 191 | b UIE |
187 | 192 | ||