Module: xenomai-2.5
Branch: master
Commit: add539a8d246475805a155e2016e659be323d320
URL:    
http://git.xenomai.org/?p=xenomai-2.5.git;a=commit;h=add539a8d246475805a155e2016e659be323d320

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Mon Apr  5 00:03:39 2010 +0200

arm: fix vfp floating point with armv7

---

 ksrc/arch/arm/switch.S |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/ksrc/arch/arm/switch.S b/ksrc/arch/arm/switch.S
index 384f2cd..e30c198 100644
--- a/ksrc/arch/arm/switch.S
+++ b/ksrc/arch/arm/switch.S
@@ -52,9 +52,12 @@ ENTRY(rthal_vfp_save)
     VFPFSTMIA  r0, r2                  @ save the working registers
     VFPFMRX    r2, FPSCR               @ current status
     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
     mov                pc, lr
 
@@ -66,9 +69,12 @@ ENTRY(rthal_vfp_load)
                                        @ FPEXC is in a safe state
     ldmia      r0, {r1, r2, r3, r12}   @ load FPEXC, FPSCR, FPINST, FPINST2
     tst                r1, #FPEXC_EX           @ is there additional state to 
restore?
-    VFPFMXR    FPINST, r3, NE          @ restore FPINST (only if FPEXC.EX is 
set)
-    tstne      r1, #FPEXC_FP2V         @ is there an FPINST2 to write?
-    VFPFMXR    FPINST2, r12, NE        @ FPINST2 if needed (and present)
+    beq                1f
+    VFPFMXR    FPINST, r3              @ restore FPINST (only if FPEXC.EX is 
set)
+    tst                r1, #FPEXC_FP2V         @ is there an FPINST2 to write?
+    beq                1f
+    VFPFMXR    FPINST2, r12    @ FPINST2 if needed (and present)
+1:
     VFPFMXR    FPSCR, r2               @ restore status
     mov                pc, lr
 #endif


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to