Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/include insert a couple of .fpu directives when...



details:   https://anonhg.NetBSD.org/src/rev/fcc4ee2637ea
branches:  trunk
changeset: 320839:fcc4ee2637ea
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Mar 02 22:23:17 2018 +0000

description:
insert a couple of .fpu directives when we access the vfp registers while
is softvpf fpu mode for gcc 6. XXX: there is no .fpu push/pop...

diffstat:

 sys/arch/arm/include/armreg.h |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r cd153cc65548 -r fcc4ee2637ea sys/arch/arm/include/armreg.h
--- a/sys/arch/arm/include/armreg.h     Fri Mar 02 20:27:51 2018 +0000
+++ b/sys/arch/arm/include/armreg.h     Fri Mar 02 22:23:17 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: armreg.h,v 1.117 2018/01/24 09:04:45 skrll Exp $       */
+/*     $NetBSD: armreg.h,v 1.118 2018/03/02 22:23:17 christos Exp $    */
 
 /*
  * Copyright (c) 1998, 2001 Ben Harris
@@ -858,13 +858,15 @@
 static inline uint32_t armreg_##name##_read(void)              \
 {                                                              \
        uint32_t __rv;                                          \
-       __asm __volatile(__insnstring : "=r"(__rv));    \
+       __asm __volatile(".fpu vfp");                           \
+       __asm __volatile(__insnstring : "=r"(__rv));            \
        return __rv;                                            \
 }
 
 #define        ARMREG_WRITE_INLINE2(name, __insnstring)                \
 static inline void armreg_##name##_write(uint32_t __val)       \
 {                                                              \
+       __asm __volatile(".fpu vfp");                           \
        __asm __volatile(__insnstring :: "r"(__val));           \
 }
 



Home | Main Index | Thread Index | Old Index