Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/vfp Add a different version vfp_fpscr_changable...



details:   https://anonhg.NetBSD.org/src/rev/0da79cd7b690
branches:  trunk
changeset: 327303:0da79cd7b690
user:      matt <matt%NetBSD.org@localhost>
date:      Tue Mar 04 08:32:23 2014 +0000

description:
Add a different version vfp_fpscr_changable if FPU_VFP was not defined.
If no FPU was found, reinit vfp_fpscr_changeable/default to values appropriate
for softfloat.

diffstat:

 sys/arch/arm/vfp/vfp_init.c |  14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diffs (49 lines):

diff -r fdbc91920ec7 -r 0da79cd7b690 sys/arch/arm/vfp/vfp_init.c
--- a/sys/arch/arm/vfp/vfp_init.c       Tue Mar 04 08:25:11 2014 +0000
+++ b/sys/arch/arm/vfp/vfp_init.c       Tue Mar 04 08:32:23 2014 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: vfp_init.c,v 1.34 2014/03/03 08:45:18 matt Exp $ */
+/*      $NetBSD: vfp_init.c,v 1.35 2014/03/04 08:32:23 matt Exp $ */
 
 /*
  * Copyright (c) 2008 ARM Ltd
@@ -44,9 +44,6 @@
 
 #include <uvm/uvm_extern.h>            /* for pmap.h */
 
-extern int cpu_media_and_vfp_features[];
-extern int cpu_neon_present;
-
 #ifdef FPU_VFP
 
 #ifdef CPU_CORTEX
@@ -171,6 +168,9 @@
        return 0;
 }
 
+#else
+/* determine what bits can be changed */
+uint32_t vfp_fpscr_changable = VFP_FPSCR_CSUM|VFP_FPSCR_ESUM|VFP_FPSCR_RMODE;
 #endif /* FPU_VFP */
 
 struct evcnt vfp_fpscr_ev = 
@@ -201,8 +201,7 @@
                return 1;
 
        if (__predict_false(!vfp_used_p())) {
-               pcb->pcb_vfp.vfp_fpscr =
-                   (VFP_FPSCR_DN | VFP_FPSCR_FZ | VFP_FPSCR_RN); /* Runfast */
+               pcb->pcb_vfp.vfp_fpscr = vfp_fpscr_default;
        }
 #endif
 
@@ -341,6 +340,9 @@
                aprint_normal_dev(ci->ci_dev, "unrecognized VFP version %x\n",
                    fpsid);
                install_coproc_handler(VFP_COPROC, vfp_fpscr_handler);
+               vfp_fpscr_changable = VFP_FPSCR_CSUM|VFP_FPSCR_ESUM
+                   |VFP_FPSCR_RMODE;
+               vfp_fpscr_default = 0;
                return;
        }
 



Home | Main Index | Thread Index | Old Index