|
@@ -101,9 +101,12 @@ ENTRY(vfp_support_entry)
|
|
VFPFSTMIA r4, r5 @ save the working registers
|
|
VFPFSTMIA r4, r5 @ save the working registers
|
|
VFPFMRX r5, FPSCR @ current status
|
|
VFPFMRX r5, FPSCR @ current status
|
|
tst r1, #FPEXC_EX @ is there additional state to save?
|
|
tst r1, #FPEXC_EX @ is there additional state to save?
|
|
- VFPFMRX r6, FPINST, NE @ FPINST (only if FPEXC.EX is set)
|
|
|
|
- tstne r1, #FPEXC_FP2V @ is there an FPINST2 to read?
|
|
|
|
- VFPFMRX r8, FPINST2, NE @ FPINST2 if needed (and present)
|
|
|
|
|
|
+ beq 1f
|
|
|
|
+ VFPFMRX r6, FPINST @ FPINST (only if FPEXC.EX is set)
|
|
|
|
+ tst r1, #FPEXC_FP2V @ is there an FPINST2 to read?
|
|
|
|
+ beq 1f
|
|
|
|
+ VFPFMRX r8, FPINST2 @ FPINST2 if needed (and present)
|
|
|
|
+1:
|
|
stmia r4, {r1, r5, r6, r8} @ save FPEXC, FPSCR, FPINST, FPINST2
|
|
stmia r4, {r1, r5, r6, r8} @ save FPEXC, FPSCR, FPINST, FPINST2
|
|
@ and point r4 at the word at the
|
|
@ and point r4 at the word at the
|
|
@ start of the register dump
|
|
@ start of the register dump
|
|
@@ -117,9 +120,12 @@ no_old_VFP_process:
|
|
@ FPEXC is in a safe state
|
|
@ FPEXC is in a safe state
|
|
ldmia r10, {r1, r5, r6, r8} @ load FPEXC, FPSCR, FPINST, FPINST2
|
|
ldmia r10, {r1, r5, r6, r8} @ load FPEXC, FPSCR, FPINST, FPINST2
|
|
tst r1, #FPEXC_EX @ is there additional state to restore?
|
|
tst r1, #FPEXC_EX @ is there additional state to restore?
|
|
- VFPFMXR FPINST, r6, NE @ restore FPINST (only if FPEXC.EX is set)
|
|
|
|
- tstne r1, #FPEXC_FP2V @ is there an FPINST2 to write?
|
|
|
|
- VFPFMXR FPINST2, r8, NE @ FPINST2 if needed (and present)
|
|
|
|
|
|
+ beq 1f
|
|
|
|
+ VFPFMXR FPINST, r6 @ restore FPINST (only if FPEXC.EX is set)
|
|
|
|
+ tst r1, #FPEXC_FP2V @ is there an FPINST2 to write?
|
|
|
|
+ beq 1f
|
|
|
|
+ VFPFMXR FPINST2, r8 @ FPINST2 if needed (and present)
|
|
|
|
+1:
|
|
VFPFMXR FPSCR, r5 @ restore status
|
|
VFPFMXR FPSCR, r5 @ restore status
|
|
|
|
|
|
check_for_exception:
|
|
check_for_exception:
|
|
@@ -175,9 +181,12 @@ ENTRY(vfp_save_state)
|
|
VFPFSTMIA r0, r2 @ save the working registers
|
|
VFPFSTMIA r0, r2 @ save the working registers
|
|
VFPFMRX r2, FPSCR @ current status
|
|
VFPFMRX r2, FPSCR @ current status
|
|
tst r1, #FPEXC_EX @ is there additional state to save?
|
|
tst r1, #FPEXC_EX @ is there additional state to save?
|
|
- VFPFMRX r3, FPINST, NE @ FPINST (only if FPEXC.EX is set)
|
|
|
|
- tstne r1, #FPEXC_FP2V @ is there an FPINST2 to read?
|
|
|
|
- VFPFMRX r12, FPINST2, NE @ FPINST2 if needed (and present)
|
|
|
|
|
|
+ beq 1f
|
|
|
|
+ VFPFMRX r3, FPINST @ FPINST (only if FPEXC.EX is set)
|
|
|
|
+ tst r1, #FPEXC_FP2V @ is there an FPINST2 to read?
|
|
|
|
+ beq 1f
|
|
|
|
+ VFPFMRX r12, FPINST2 @ FPINST2 if needed (and present)
|
|
|
|
+1:
|
|
stmia r0, {r1, r2, r3, r12} @ save FPEXC, FPSCR, FPINST, FPINST2
|
|
stmia r0, {r1, r2, r3, r12} @ save FPEXC, FPSCR, FPINST, FPINST2
|
|
mov pc, lr
|
|
mov pc, lr
|
|
ENDPROC(vfp_save_state)
|
|
ENDPROC(vfp_save_state)
|