aboutsummaryrefslogtreecommitdiff
path: root/lib/msun/aarch64
Commit message (Collapse)AuthorAgeFilesLines
* lib/msun/aarch64: provide export file for arch-specific fenv methodsKonstantin Belousov2026-04-083-5/+37
| | | | | | | | | Reported and tested by: fluffy Reviewed by: emaste Fixes: 3a01e1e1a50cb9a9594aac2148dc920a6b295428 Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56283
* msun: remove requirement to have C99 inline semanticKonstantin Belousov2026-03-301-5/+0
| | | | | | | | | | The 'extern inline' usage is removed. PR: 277958 Reviewed by: dim Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56139
* msun/aarch64: convert fenv functions to proper linkageKonstantin Belousov2026-03-302-23/+90
| | | | | | | | | | | | | | | | | | | | | | | namely fegetexceptflag(3) fesetexceptflag(3) feraiseexcept(3) fetestexcept(3) fegetround(3) fesetround(3) fegetenv(3) feholdexcept(3) fesetenv(3) feupdateenv(3) feenableexcept(3) fedisableexcept(3) fegetexcept(3) PR: 277958 Reviewed by: dim Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56139
* fenv.h: stop declaring feclearexcept() extern inlineKonstantin Belousov2026-03-262-3/+11
| | | | | | | | | | | | The function is already exported from libm. We only need to stop declare it extern inline, and instead provide a macro which uses the internal inline function __feclearexcept_int() instead. PR: 277958 Reviewed by: dim (x86) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D55975
* arm: fix build after _types.h changesBrooks Davis2025-06-121-0/+1
| | | | | Reported by: alc Fixes: b01e971fd39d ("Don't rely on sys/_types.h including sys/cdefs.h")
* Remove residual blank line at start of MakefileWarner Losh2024-07-151-1/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-162-4/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* arm64 lib32: prepare arm64 headers to redirect to armMike Karels2023-07-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | | In order to compile lib32 libraries and other 32-bit code on arm64, <machine/foo.h> needs to be redirected to an arm header rather than arm64 when building with -m32. Ifdef the arm64 headers that are installed in /usr/include/machine and used by user-level software (including references from /usr/include/*.h) so that if __arm__ is defined when including the arm64 version, <arm/foo.h> is included rather than using the rest of the file's contents. Some arm headers had no arm64 equivalent; headers were added just to do the redirection. These files use #error if __arm__ is not defined to guard against confusion. Also add an include/arm Makefile, and modify Makefiles as needed to install everything, including the arm files in /usr/include/arm. fenv.h comes from lib/msun/arm/fenv.h. The new arm64 headers are: acle-compat.h cpuinfo.h sysreg.h Reviewed by: jrtc27, imp Differential Revision: https://reviews.freebsd.org/D40944
* Use a builtin where possible in msunAndrew Turner2021-11-191-0/+12
| | | | | | | | | | | | | | | | | | Some of the functions in msun can be implemented using a compiler builtin function to generate a small number of instructions. Implement this support in fma, fmax, fmin, and sqrt on arm64. Care must be taken as the builtin can be implemented as a function call on some architectures that lack direct support. In these cases we need to use the original code path. As we don't set errno on failure build with -fno-math-errno so the toolchain doesn't convert a builtin into a function call when it detects a failure, e.g. gcc will add a call to sqrt when the input is negative leading to an infinite loop. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32801
* Save all fpcr/fpsr bits in the AArch64 fenv_tAlex Richardson2021-03-121-10/+10
| | | | | | | | | | | | | | | | | | The existing code masked off all bits that it didn't know about. To be future-proof, we should save and restore the entire fpcr/fpsr registers. Additionally, the existing fesetenv() was incorrectly setting the rounding mode in fpsr instead of fpcr. This patch stores fpcr in the high 32 bits of fenv_t and fpsr in the low bits instead of trying to interleave them in a single 32-bit field. Technically, this is an ABI break if you re-compile parts of your code or pass a fenv_t between DSOs that were compiled with different versions of fenv.h. However, I believe we should fix this since the existing code was broken and passing fenv_t across DSOs should rarely happen. Reviewed By: andrew Differential Revision: https://reviews.freebsd.org/D29160
* Add the fe* symbols to libm for arm64.Andrew Turner2015-03-311-0/+56
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=280913
* Correct mrs_fpcr and mrs_fpsr macros in arm64 fenv.hEd Maste2015-03-301-21/+22
| | | | | | | | Submitted by: andrew Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=280857
* Start to import support for the AArch64 architecture from ARM. This changeAndrew Turner2015-03-192-0/+249
only adds support for kernel-toolchain, however it is expected further changes to add kernel and userland support will be committed as they are reviewed. As our copy of binutils is too old the devel/aarch64-binutils port needs to be installed to pull in a linker. To build either TARGET needs to be set to arm64, or TARGET_ARCH set to aarch64. The latter is set so uname -p will return aarch64 as existing third party software expects this. Differential Revision: https://reviews.freebsd.org/D2005 Relnotes: Yes Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=280259