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 more vfp directives for gcc-6
details: https://anonhg.NetBSD.org/src/rev/5a4def1eeb3d
branches: trunk
changeset: 830252:5a4def1eeb3d
user: christos <christos%NetBSD.org@localhost>
date: Fri Mar 02 23:07:55 2018 +0000
description:
Add more vfp directives for gcc-6
diffstat:
sys/arch/arm/vfp/vfp_init.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diffs (56 lines):
diff -r 961ca4ca1076 -r 5a4def1eeb3d sys/arch/arm/vfp/vfp_init.c
--- a/sys/arch/arm/vfp/vfp_init.c Fri Mar 02 22:23:17 2018 +0000
+++ b/sys/arch/arm/vfp/vfp_init.c Fri Mar 02 23:07:55 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfp_init.c,v 1.55 2017/10/16 15:13:00 bouyer Exp $ */
+/* $NetBSD: vfp_init.c,v 1.56 2018/03/02 23:07:55 christos Exp $ */
/*
* Copyright (c) 2008 ARM Ltd
@@ -47,23 +47,26 @@
#ifdef FPU_VFP
#ifdef CPU_CORTEX
-__asm(".fpu\tvfpv4");
+#define SETFPU __asm(".fpu\tvfpv4")
#else
-__asm(".fpu\tvfp");
+#define SETFPU __asm(".fpu\tvfp")
#endif
+SETFPU;
/* FLDMD <X>, {d0-d15} */
static inline void
load_vfpregs_lo(const uint64_t *p)
{
- __asm __volatile("vldmia %0, {d0-d15}" :: "r" (p) : "memory");
+ SETFPU;
+ __asm __volatile("vldmia\t%0, {d0-d15}" :: "r" (p) : "memory");
}
/* FSTMD <X>, {d0-d15} */
static inline void
save_vfpregs_lo(uint64_t *p)
{
- __asm __volatile("vstmia %0, {d0-d15}" :: "r" (p) : "memory");
+ SETFPU;
+ __asm __volatile("vstmia\t%0, {d0-d15}" :: "r" (p) : "memory");
}
#ifdef CPU_CORTEX
@@ -71,6 +74,7 @@
static inline void
load_vfpregs_hi(const uint64_t *p)
{
+ SETFPU;
__asm __volatile("vldmia\t%0, {d16-d31}" :: "r" (&p[16]) : "memory");
}
@@ -78,6 +82,7 @@
static inline void
save_vfpregs_hi(uint64_t *p)
{
+ SETFPU;
__asm __volatile("vstmia\t%0, {d16-d31}" :: "r" (&p[16]) : "memory");
}
#endif
Home |
Main Index |
Thread Index |
Old Index