lib: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using mis-identified many licenses so this was mostly a manual - errorpr
lib: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using mis-identified many licenses so this was mostly a manual - errorprone - task.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier for automated tools to detect and summarize well knownopensource licenses. We are gradually adopting the specification, notingthat the tags are considered only advisory and do not, in any way,superceed or replace the license texts.
show more ...
Support armv7 builds for userlandMake armv7 as a new MACHINE_ARCH.Copy all the places we do armv6 and add armv7 as basically analias. clang appears to generate code for armv7 by default. armv7 h
Support armv7 builds for userlandMake armv7 as a new MACHINE_ARCH.Copy all the places we do armv6 and add armv7 as basically analias. clang appears to generate code for armv7 by default. armv7 hardfloat isn't supported by the the in-tree gcc, so it hasn't beenupdated to have a new default.Support armv7 as a new valid MACHINE_ARCH (and by extensionTARGET_ARCH).Add armv7 to the universe build.Differential Revision: https://reviews.freebsd.org/D12010
libm: remove duplicate version script entriesThese symbols already appear in the common lib/msun/Symbol.map.Duplicate entries produce an error with LLVM's LLD linker.Reviewed by: brMFC after: 1
libm: remove duplicate version script entriesThese symbols already appear in the common lib/msun/Symbol.map.Duplicate entries produce an error with LLVM's LLD linker.Reviewed by: brMFC after: 1 weekSponsored by: The FreeBSD FoundationDifferential Revision: https://reviews.freebsd.org/D8627
Make armv6 hard float abi by default. Kill armv6hf.Allow CPUTYPE=soft to build the current soft-float abi libraries.Add UPDATING entry to announce this.Approved by: re@ (gjb)
Implement (ACFLAGS|CFLAGS|CXXFLAGS).SRC globally.Sponsored by: EMC / Isilon Storage Division
Fix compilation when the armv6 world is being compiled without hw floatingpoint support. The fenv-vfp.c file overrides -mfloat-abi so it can usefloating point instructions if it detects support at
Fix compilation when the armv6 world is being compiled without hw floatingpoint support. The fenv-vfp.c file overrides -mfloat-abi so it can usefloating point instructions if it detects support at runtime. Make it alsooverride -mfpu in case the user has set -mfpu=none.
From https://sourceware.org/ml/newlib/2014/msg00113.htmlBy 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 feature
From https://sourceware.org/ml/newlib/2014/msg00113.htmlBy 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 thecouple of places in tree. clang already implements ACLE. Add a definethat says we implement version 1.1, even though the implementationisn't quite complete.
Only build the vfp/softfp switching code on armv6 as we don't support vfpon anything earlier than this. This should fix the armeb and arm buildswhen using gcc.
Build fenv-vfp.c with the softfp float abi. Without this gcc generates anincorrect assembly file that doesn't allow for vfp instructions.
On armv6 access both the softfloat and, when available, the vfp to get andset the floating-point environment.
* Mark static inline functions with __fenv_static. * Correctly shift the mask when masking/unmasking exceptions.
Update the hard-float version of the fenv functions to use the VFP unit.Any other floating-point unit is unsupported on ARM.
Add a change I missed in r230367 (don't inline arm's fenv.h functions).
Don't inline fenv.h functions on arm for now. Inlining makes sense:the function bodies require only 2 to 10 instructions. However, itleads to application binaries that refer to a private ABI, nam
Don't inline fenv.h functions on arm for now. Inlining makes sense:the function bodies require only 2 to 10 instructions. However, itleads to application binaries that refer to a private ABI, namely, thesoftfloat innards in libc. This could complicate future changes inthe implementation of the floating-point emulation layer, so it seemsbest to have programs refer to the official fe* entry points in libm.
Add an implementation of fenv.h intended for platforms that lack an FPU anduse softfloat.Thanks to Ian Lepore for testing and debugging this patch. The fenvregression tests pass (at least for Ia
Add an implementation of fenv.h intended for platforms that lack an FPU anduse softfloat.Thanks to Ian Lepore for testing and debugging this patch. The fenvregression tests pass (at least for Ian's arm chip) with this change.
Use #include "fenv.h" instead of #include <fenv.h>. This makes itmore convenient to compile the math library by itself.Requested by: bde
Provide external definitions of all of the standardized functions infenv.h that are currently inlined.The definitions are provided in fenv.c via 'extern inline'declaractions. This assumes the co
Provide external definitions of all of the standardized functions infenv.h that are currently inlined.The definitions are provided in fenv.c via 'extern inline'declaractions. This assumes the compiler handles 'extern inline' asspecified in C99, which has been true under FreeBSD since 8.0.The goal is to eventually remove the 'static' keyword from the inlinedefinitions in fenv.h, so that non-inlined references all wind uppointing to the same external definition like they're supposed to.I am deferring the second step to provide a window wherenewly-compiled apps will still link against old math libraries.(This isn't supported, but there's no need to cause undue breakage.)Reviewed by: stefanf, bde
Use C comments since we now preprocess these files with CPP.
Add symbol versioning to libm.
Replace fegetmask() and fesetmask() with feenableexcept(),fedisableexcept(), and fegetexcept(). These two sets of routinesprovide the same functionality. I implemented the former as anundocument
Replace fegetmask() and fesetmask() with feenableexcept(),fedisableexcept(), and fegetexcept(). These two sets of routinesprovide the same functionality. I implemented the former as anundocumented internal interface to make the regression test easier towrite. However, fe(enable|disable|get)except() is already part ofglibc, and I would like to avoid gratuitous differences. The onlymajor flaw in the glibc API is that there's no good way to reporterrors on processors that don't support all the unmasked exceptions.
Define the LDBL_PREC to be the number of significant bits in a longdouble's mantissa.
Define FE_TONEAREST, FE_TOWARDZERO, FE_UPWARD, FE_DOWNWARD and _ROUND_MASK tounbreak the build for arm.
Mark all inline asms that read the floating-point control or statusregisters as volatile. Instructions that *wrote* to FP state werealready marked volatile, but apparently gcc has license to move
Mark all inline asms that read the floating-point control or statusregisters as volatile. Instructions that *wrote* to FP state werealready marked volatile, but apparently gcc has license to movenon-volatile asms past volatile asms. This broke amd64's feupdateenvat -O2 due to a WAR conflict between fnstsw and fldenv there.
Only use rfs and wfs if ARM_HARD_FLOAT is defined, and use stubs if it is not,in order to unbreak arm make world. The right way to do it with soft floatswill be figured out later.Discussed with: d
Only use rfs and wfs if ARM_HARD_FLOAT is defined, and use stubs if it is not,in order to unbreak arm make world. The right way to do it with soft floatswill be figured out later.Discussed with: das
Add an fenv.h implementation for the arm port.It does not appear to be possible to cross-build arm from i386 at themoment, and I have no ARM hardware anyway. Thus, I'm sure there arebugs. I wil
Add an fenv.h implementation for the arm port.It does not appear to be possible to cross-build arm from i386 at themoment, and I have no ARM hardware anyway. Thus, I'm sure there arebugs. I will gladly fix these when the arm port is more mature.Reviewed by: standards@