summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2014-10-29 16:24:02 +0000
committerandrew <andrew@FreeBSD.org>2014-10-29 16:24:02 +0000
commitf0629d0f088e0764c7bc26a56baca5b4ef8acf1d (patch)
tree8619454664cc75a8f2255ce6878703397c091972 /lib
parent456c95b69d6b29abf5f35a1075e5e5c95c5a7d56 (diff)
downloadFreeBSD-src-f0629d0f088e0764c7bc26a56baca5b4ef8acf1d.zip
FreeBSD-src-f0629d0f088e0764c7bc26a56baca5b4ef8acf1d.tar.gz
MFC r269956:
From https://sourceware.org/ml/newlib/2014/msg00113.html By Richard Earnshaw at ARM > >GCC has for a number of years provides a set of pre-defined macros for >use with determining the ISA and features of the target during >pre-processing. However, the design was always somewhat cumbersome in >that each new architecture revision created a new define and then >removed the previous one. This meant that it was necessary to keep >updating the support code simply to recognise a new architecture being >added. > >The ACLE specification (ARM C Language Extentions) >(http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.set.swdev/index.html) >provides a much more suitable interface and GCC has supported this >since gcc-4.8. > >This patch makes use of the ACLE pre-defines to map to the internal >feature definitions. To support older versions of GCC a compatibility >header is provided that maps the traditional pre-defines onto the new >ACLE ones. Stop using __FreeBSD_ARCH_armv6__ and switch to __ARM_ARCH >= 6 in the couple of places in tree. clang already implements ACLE. Add a define that says we implement version 1.1, even though the implementation isn't quite complete.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/arm/aeabi/aeabi_vfp.h6
-rw-r--r--lib/msun/arm/fenv.c4
2 files changed, 7 insertions, 3 deletions
diff --git a/lib/libc/arm/aeabi/aeabi_vfp.h b/lib/libc/arm/aeabi/aeabi_vfp.h
index 76c2ff0..927652f 100644
--- a/lib/libc/arm/aeabi/aeabi_vfp.h
+++ b/lib/libc/arm/aeabi/aeabi_vfp.h
@@ -30,6 +30,8 @@
#ifndef AEABI_VFP_H
#define AEABI_VFP_H
+#include <machine/acle-compat.h>
+
/*
* ASM helper macros. These allow the functions to be changed depending on
* the endian-ness we are building for.
@@ -49,7 +51,7 @@
* point falue. They will load the data from an ARM to a VFP register(s),
* or from a VFP to an ARM register
*/
-#ifdef __ARMEB__
+#ifdef __ARM_BIG_ENDIAN
#define LOAD_DREG(vreg, reg0, reg1) vmov vreg, reg1, reg0
#define UNLOAD_DREG(reg0, reg1, vreg) vmov reg1, reg0, vreg
#else
@@ -65,7 +67,7 @@
* C Helper macros
*/
-#if defined(__FreeBSD_ARCH_armv6__) || (defined(__ARM_ARCH) && __ARM_ARCH >= 6)
+#if __ARM_ARCH >= 6
/*
* Generate a function that will either call into the VFP implementation,
* or the soft float version for a given __aeabi_* helper. The function
diff --git a/lib/msun/arm/fenv.c b/lib/msun/arm/fenv.c
index 2dd1933..16f1f48 100644
--- a/lib/msun/arm/fenv.c
+++ b/lib/msun/arm/fenv.c
@@ -30,7 +30,9 @@
#define __fenv_static
#include "fenv.h"
-#if defined(__FreeBSD_ARCH_armv6__) || (defined(__ARM_ARCH) && __ARM_ARCH >= 6)
+#include <machine/acle-compat.h>
+
+#if __ARM_ARCH >= 6
#define FENV_ARMv6
#endif
OpenPOWER on IntegriCloud