Commit 452ae362 authored by Russell King's avatar Russell King

[ARM] Switch to SVC mode using read/modify/write.

parent 53e0f559
...@@ -1093,8 +1093,10 @@ vector_data: @ ...@@ -1093,8 +1093,10 @@ vector_data: @
@ @
@ now branch to the relevant MODE handling routine @ now branch to the relevant MODE handling routine
@ @
mov r13, #PSR_I_BIT | MODE_SVC mrs r13, cpsr
msr spsr_c, r13 @ switch to SVC_32 mode bic r13, r13, #MODE_MASK
orr r13, r13, #MODE_SVC
msr spsr, r13 @ switch to SVC_32 mode
and lr, lr, #15 and lr, lr, #15
ldr lr, [pc, lr, lsl #2] ldr lr, [pc, lr, lsl #2]
...@@ -1135,8 +1137,10 @@ vector_prefetch: ...@@ -1135,8 +1137,10 @@ vector_prefetch:
@ @
@ now branch to the relevant MODE handling routine @ now branch to the relevant MODE handling routine
@ @
mov r13, #PSR_I_BIT | MODE_SVC mrs r13, cpsr
msr spsr_c, r13 @ switch to SVC_32 mode bic r13, r13, #MODE_MASK
orr r13, r13, #MODE_SVC
msr spsr, r13 @ switch to SVC_32 mode
ands lr, lr, #15 ands lr, lr, #15
ldr lr, [pc, lr, lsl #2] ldr lr, [pc, lr, lsl #2]
...@@ -1176,8 +1180,10 @@ vector_undefinstr: ...@@ -1176,8 +1180,10 @@ vector_undefinstr:
@ @
@ now branch to the relevant MODE handling routine @ now branch to the relevant MODE handling routine
@ @
mov r13, #PSR_I_BIT | MODE_SVC mrs r13, cpsr
msr spsr_c, r13 @ switch to SVC_32 mode bic r13, r13, #MODE_MASK
orr r13, r13, #MODE_SVC
msr spsr, r13 @ switch to SVC_32 mode
and lr, lr, #15 and lr, lr, #15
ldr lr, [pc, lr, lsl #2] ldr lr, [pc, lr, lsl #2]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment