aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/arm/aeabi
Commit message (Collapse)AuthorAgeFilesLines
* libc/arm: use __builtin_trap() instead of abort() in aeabi_unwind stubsRobert Clausecker2026-02-131-6/+6
| | | | | | | | | | This avoids a dependency on the abort symbol in libsys. PR: 292539 Reviewed by: mmel Approved by: markj (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55255
* libgcc_s: export integer and floating point __aeabi_ symbolsMichal Meloun2025-05-043-45/+5
| | | | | | | | | | | | | | | | | | | Export all integer and floating point __aeabi_ functions defined by "Run-time ABI for Arm Architecture" from libgcc, excluding __aeabi_h2f_alt, __aeabi_f2h_alt and __aeabi_d2h_alt, which are not yet implemented by compiler-rt. To maintain ABI backward compatibility, convert __aeabi_ floating-point symbols previously exported from libc to an explicit non-default version. Remove guessing of vfp/not-vfp version for compiler-rt sources. The vfp version needs additional runtime logic to select the right implementation and we don't have it implemented. MFC after: 1 month Reviewed by: dim PR: 271087 Differential Revision: https://reviews.freebsd.org/D50100
* 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
* libc: Replace armv6 with armv7 in a commentAndrew Turner2024-06-202-2/+2
| | | | | | | | Armv6 is being removed from the treem and the comment applies to armv7. Reviewed by: manu, imp, emaste Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45645
* lib: Remove __ARM_ARCH checks that are always trueAndrew Turner2024-06-121-1/+1
| | | | | Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D45559
* libc: Remove empty comments in Symbol.mapBrooks Davis2023-11-151-3/+0
| | | | | | | These were left over from $FreeBSD$ removal. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42612
* libc: Purge unneeded cdefs.hWarner Losh2023-11-015-5/+0
| | | | | | | | | These sys/cdefs.h are not needed. Purge them. They are mostly left-over from the $FreeBSD$ removal. A few in libc are still required for macros that cdefs.h defines. Keep those. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D42385
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-1610-20/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* Remove $FreeBSD$: one-line .h patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-124-4/+4
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* libc: Simplify soft-float on 32-bit armWarner Losh2023-02-141-3/+2
| | | | | | | | | | | | | Simplify the tests for 32-bit arm soft float support. For the files included only on arm, drop the test entirely. For others, test MACHINE_CPUARCH against arm. No functional change intended. File lists appear the same before / after the change. Sponsored by: Netflix Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D38582
* Move all sources from the llvm project into contrib/llvm-project.Dimitry Andric2019-12-201-1/+1
| | | | | | | | | | | | | This uses the new layout of the upstream repository, which was recently migrated to GitHub, and converted into a "monorepo". That is, most of the earlier separate sub-projects with their own branches and tags were consolidated into one top-level directory, and are now branched and tagged together. Updating the vendor area to match this layout is next. Notes: svn path=/head/; revision=355940
* armv6 soft float build fixedWarner Losh2019-11-141-1/+1
| | | | | | | | | | | Add ifdefs in the assembler for soft-float compile case. Submitted by: Hiroki Mori Reviewed by: ray@ Differential Review: https://reviews.freebsd.org/D22352 Notes: svn path=/head/; revision=354700
* libc: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-254-4/+12
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using mis-identified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326193
* Support armv7 builds for userlandWarner Losh2017-10-051-3/+3
| | | | | | | | | | | | | | | | | | | Make armv7 as a new MACHINE_ARCH. Copy all the places we do armv6 and add armv7 as basically an alias. clang appears to generate code for armv7 by default. armv7 hard float isn't supported by the the in-tree gcc, so it hasn't been updated to have a new default. Support armv7 as a new valid MACHINE_ARCH (and by extension TARGET_ARCH). Add armv7 to the universe build. Differential Revision: https://reviews.freebsd.org/D12010 Notes: svn path=/head/; revision=324340
* Publish __aeabi_uidiv and __aeabi_idiv as compatible symbols from libc.Michal Meloun2017-02-173-1/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to bug[1] in libcompiler_rt, all symbols declared by DEFINE_AEABI_FUNCTION_ALIAS() are not hidden. All these but two are explicitly exported from libc and don't causes problems. Remaining two, __aeabi_uidiv and __aeabi_idiv, infecting all non-versioned shared libraries. And these symbols are consumed by many (if not all) packages[2]. As workaround, export these from libc as compatible symbols, in global namespace. With this, these are still visible for rtld, but static linker doesn't use then. [1] DEFINE_AEABI_FUNCTION_ALIAS() macro uses '.set' directive for declaration of aliased symbol. Unfortunately, '.set' doesn't inherit visibility of base symbol, and macro don't explicitly sets visibility for aliased one. [2] Given symbols are exported from non-versioned libraries only if library itself uses them. So, if world is built for CPU with HW divide, these function are not used and given symbols are not exported. By this, contents of these libraries is not stable, and all packages fails to run. Note: Due to r313823 I'm forced to commit this too early, without leave enough time for proper review. MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D9632 Notes: svn path=/head/; revision=313866
* Replace dot-dot relative pathing with SRCTOP-relative paths where possibleEnji Cooper2017-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | This reduces build output, need for recalculating paths, and makes it clearer which paths are relative to what areas in the source tree. The change in performance over a locally mounted UFS filesystem was negligible in my testing, but this may more positively impact other filesystems like NFS. LIBC_SRCTOP was left alone so Juniper (and other users) can continue to manipulate lib/libc/Makefile (and other Makefile.inc's under lib/libc) as include Makefiles with custom options. Discussed with: marcel, sjg MFC after: 1 week Reviewed by: emaste Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D9207 Notes: svn path=/head/; revision=312451
* Make armv6 hard float abi by default. Kill armv6hf.Warner Losh2016-05-181-2/+3
| | | | | | | | | | Allow CPUTYPE=soft to build the current soft-float abi libraries. Add UPDATING entry to announce this. Approved by: re@ (gjb) Notes: svn path=/head/; revision=300119
* Revert a change that sneeked with 297619Andrew Turner2016-04-061-3/+1
| | | | Notes: svn path=/head/; revision=297620
* Disable support for compat syscalls on arm64. These symbols were neverAndrew Turner2016-04-061-1/+3
| | | | | | | | | | shipped since arm64 exists only on 11+. Submitted by: brooks Reviewed by: emaste, imp Notes: svn path=/head/; revision=297619
* Annotate arm userspace assembler sources stating their tolerance toKonstantin Belousov2015-09-294-0/+6
| | | | | | | | | | the non-executable stack. Reviewed by: andrew Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=288373
* Export the ARM __aeabi_mem* functions from libc, they are needed by the gccAndrew Turner2015-06-162-8/+17
| | | | | | | | | | from ports as it doesn't include these in the copy of libgcc it installs uses. Obtained from: ABT Systems Ltd Notes: svn path=/head/; revision=284451
* Use a register to set the cpsr bits. The ip register is safe to be changedAndrew Turner2015-05-312-8/+12
| | | | | | | | | | | within all of these functions, and is only stored in some to correctly pad the stack. This will be needed to build as Thumb-2 as, unlike with ARM instructions, the msr instruction only takes a register as the input. Notes: svn path=/head/; revision=283807
* Teach bits of libc about Thumb. This adds the if-then instructions neededAndrew Turner2015-05-122-2/+14
| | | | | | | | | | | | to handle the ARM conditional execution. While here fix a bug found by this in the hard-float code, cc is the opposite of cs. The former is used for 'less than' in floating-point code and is executed when the C (carry) bit is clear, the latter is used when greater than, equal, or unordered, and is executed when the C bit is set. Notes: svn path=/head/; revision=282816
* Apparently more Makefiles use stuff from compiler-rt, so fix them upDimitry Andric2015-01-081-1/+1
| | | | | | | too. (This did not show during a make universe, strangely.) Notes: svn path=/head/; revision=276853
* Add support for the __aeabi_c*cmp* functions. These are similar to theAndrew Turner2014-10-148-1/+337
| | | | | | | | | | | | existing functions with the exception they use the condition flags to store the result. Differential Revision: https://reviews.freebsd.org/D872 Silence from: current@ and numerics@ MFC after: 1 week Notes: svn path=/head/; revision=273088
* Clean up detection of hard-float ABIs. As with big-endian in r272368 weAndrew Turner2014-10-011-1/+1
| | | | | | | can check against arm*hf*. Notes: svn path=/head/; revision=272369
* From https://sourceware.org/ml/newlib/2014/msg00113.htmlWarner Losh2014-08-141-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=269956
* Add dl_unwind_find_exidx() for ARM EABI, required for C++ exceptionIan Lepore2014-07-192-1/+106
| | | | | | | | | | | | | | | | | | | handling. For statically linked apps this uses the __exidx_start/end symbols set up by the linker. For dynamically linked apps it finds the shared object that contains the given address and returns the location and size of the exidx section in that shared object. The dl_unwind_find_exidx() name is used by other BSD projects and Android, and is mentioned in clang 3.5 comments as "the BSD interface" for finding exidx data. GCC (in libgcc_s) expects the exact same API and functionality to be provided by a function named __gnu_Unwind_Find_exidx(), so we provide that with an alias ("strong reference"). Reviewed by: kib@ MFC after: 1 week Notes: svn path=/head/; revision=268893
* Add a new ARM TARGET_ARCH, armv6hf. This is considered experimental.Andrew Turner2014-03-231-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This targets the existing ARMv6 and ARMv7 SoCs that contain a VFP unit. This is an optional coprocessors may not be present in all devices, however it appears to be in all current SoCs we support. armv6hf targets the VFP variant of the ARM EABI and our copy of gcc is too old to support this. Because of this there are a number of WITH/WITHOUT options that are unsupported and must be left as the default value. The options and their required value are: * WITH_ARM_EABI * WITHOUT_GCC * WITHOUT_GNUCXX In addition, without an external toolchain, the following need to be left as their default: * WITH_CLANG * WITH_CLANG_IS_CC As there is a different method of passing float and double values to functions the ABI is incompatible with existing armv6 binaries. To use this a full rebuild of world is required. Because no floating point values are passed into the kernel an armv6 kernel with VFP enabled will work with an armv6hf userland and vice versa. Notes: svn path=/head/; revision=263660
* Remove an extra 1 in an #if lineAndrew Turner2014-03-161-1/+1
| | | | | | | Reported by: ian@ Notes: svn path=/head/; revision=263243
* Fix the spelling of function.Andrew Turner2014-03-162-2/+2
| | | | | | | Reported by: ian@ Notes: svn path=/head/; revision=263242
* Add an optimised version of the float and double helper functions. TheseAndrew Turner2014-03-166-124/+537
| | | | | | | | | | are only used on armv6 when the vfp unit is detected. They will also be available for the upcoming armv6hf platform, however while not used by default there will need to be defined for any software that calls them directly. Notes: svn path=/head/; revision=263239
* Replace use of ${.CURDIR} by ${LIBC_SRCTOP} and define ${LIBC_SRCTOP}Marcel Moolenaar2014-03-041-3/+3
| | | | | | | | | | | | | | if not already defined. This allows building libc from outside of lib/libc using a reach-over makefile. A typical use-case is to build a standard ILP32 version and a COMPAT32 version in a single iteration by building the COMPAT32 version using a reach-over makefile. Obtained from: Juniper Networks, Inc. Notes: svn path=/head/; revision=262722
* When clang builds libc it may insert calls to __aeabi_* functions. NormallyAndrew Turner2013-02-121-0/+19
| | | | | | | | | | | | | this is not a problem as they are resolved by libgcc. The exception is for the __aeabi_mem* functions. These call back into libc to the appropriate function. This causes issues for static binaries as we only link against libc once so there is no way for it to call into libgcc and back. The fix for this is to include these symbols in libc but keep them hidden so binaries use the libgcc version. Notes: svn path=/head/; revision=246706
* Add the required __aeabi_* functions to libc.Andrew Turner2013-01-196-0/+359
The floating point functions are here rather than compiler-rt because the libc softfloat code allows us to set the rounding mode. Notes: svn path=/head/; revision=245655