aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/arm
Commit message (Collapse)AuthorAgeFilesLines
* libc: remove ARMv5/6 from man pageMinsoo Choo2025-11-291-4/+1
| | | | | | Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1903
* libc, libthr: Ditch MD __pthread_distribute_static_tls helpersJessica Clarke2025-05-291-45/+0
| | | | | | | | | | | | | | | | | | _libc_get_static_tls_base() is just _tcb_get() followed by adding (for Variant I) or subtracting (for Variant II) the offset, so just inline that as the implementation (like we do in rtld-elf) rather than having another copy (or equivalent) of _tcb_get()'s assembly. _get_static_tls_base() doesn't even have any MD assembly as it's reading thr->tcb, the only difference is whether to add or subtract, so again just inline that. Whilst here add some missing blank lines to comply with style(9) for elf_utils.c's includes, and use a pointer type rather than uintptr_t to reduce the need to cast, as is done in rtld-elf. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D50592
* 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-153-3/+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-123-7/+7
| | | | | Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D45559
* libc/arm: export __signalcontext not _signalcontextBrooks Davis2024-04-161-1/+1
| | | | | | | The former exists and architectures other than aarch64 and riscv provide it. The later does not exist. Differential Revision: https://reviews.freebsd.org/D44329
* libc/softfloat: we don't export _fp[gs]et* symbolsBrooks Davis2024-03-132-8/+0
| | | | | | | | | | Remove attempts to use NetBSD __weak_alias macros to export _-prefixed versions of various fp[sg]et* symbols under softfloat. __weak_alias isn't defined so we didn't export them and thus the Symbol.map entries were wrong. Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D44327
* lib{c,sys}: return wrapped syscall APIs to libcBrooks Davis2024-03-131-0/+3
| | | | | | | | | | | | | These provide standard APIs, but are implemented using another system call (e.g., pipe implemented in terms of pipe2) or are interposed by the threading library to support cancelation. After discussion with kib (see D44111), I've concluded that it is better to keep most public interfaces in libc with as little as possible in libsys. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D44241
* libc: move MD sys related symbols to libsysBrooks Davis2024-02-051-8/+0
| | | | | | | This is a mix genuine MD interfaces and compat symbols like _getlogin. Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908
* libc: Move per-arch sys/Makefile.inc to libsysBrooks Davis2024-02-051-4/+0
| | | | | | | | | | | | | | | libc/<arch>/sys/Makefile.inc -> libsys/<arch>/Makefile.sys. Require that libsys/<arch>/Makefile.sys exist. At least for current archtiectures, it's not possible for an architecture to not have and MD syscall bits. powerpcspe/Makefile.sys's structure means it had to be modified when moved so rename detection won't work, but it has trivial contents so the history is unimportant. Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908
* libc: libc/<arch>/sys/__vdso_gettc -> libsys/<arch>/Brooks Davis2024-02-051-88/+0
| | | | | Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908
* libsys: relocate implementations and manpagesBrooks Davis2024-02-054-207/+0
| | | | | | | | | Remove core system call implementations and documentation to lib/libsys and lib/libsys/<arch> from lib/libc/sys and lib/libc/<arch>/<sys>. Update paths to allow libc to find them in their new home. Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908
* arm/SYS.h: align with other archesBrooks Davis2023-12-182-19/+13
| | | | | | | | | | Rename SYSTRAP() macro to _SYSCALL() and add _SYSCALL_BODY() which invokes the syscall via _SYCALL() and then calls cerror as required. Use to implement PSEUDO() and RSYSCALL() removing _SYSCALL_NOERROR(). Reviewed by: imp Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D43061
* arm/SYS.h: remove unused CURBRK macroBrooks Davis2023-12-181-1/+0
| | | | | | | | | The last use was removed in 2018 as part of a reimplementation of brk() and sbrk() in commit 9d9fd255d646b6c389fa347cb633c665c4485aa4. Reviewed by: imp Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D43060
* libc/*/SYS.h: remove SYCALL macroBrooks Davis2023-12-121-3/+0
| | | | | | | | | | | This has not been a univerally available interface since it was removed from amd64 by commit efbef97de9805dec95db09953426f0b21bb2964f in 2004. I removed the last consumers in 2016 when I replaced pipe(2) with pipe2(2) in commit b60998c6331e2be21f1fc29fa6c82d94a1f72ef0. Reviewed by: imp, jhibbits Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42996
* libc: rename arm and i386 Ovfork.S to vfork.SBrooks Davis2023-12-062-4/+1
| | | | | | | | | While this has been Ovfork.S forever on i386 it differs from other syscalls that require wrappers for no obvious reason so fix that. Reviewed by: kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42909
* Remove never implemented sbrk and sstk syscallsBrooks Davis2023-12-041-1/+1
| | | | | | | | | | | | | Both system calls were stubs returning EOPNOTSUPP and libc did not provide _ or __sys_ prefixed symbols. The actual implementation of sbrk(2) is on top of the undocumented break(2) system call. Technically this is a change in ABI, but no non-contrived program ever called these syscalls. Reviewed by: kib, emaste Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42872
* lib: Remove ancient SCCS tags.Warner Losh2023-11-275-9/+0
| | | | | | | | Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script. Sponsored by: Netflix
* libc: centralize a few numeric symbolsBrooks Davis2023-11-151-3/+0
| | | | | | | | | | | | fabs, __infinity, and __nan are universally implemented so declare them in gen/Symbol.map. We would also include __flt_rounds, but it's under FBSD_1.3 on arm so until that's gone we're stuck with it. Likewise, everyone but i386 implements fp[gs]etmask. Reviewed by: imp, kib, emaste Differential Revision: https://reviews.freebsd.org/D42618
* libc: centralize makecontext symbolsBrooks Davis2023-11-151-2/+0
| | | | | | | | Declare makecontext() and __makecontext() symbols centrally as they are always implemented. Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D42617
* libc: centralize {_,sig,}{set,long}jmp symbolsBrooks Davis2023-11-151-6/+0
| | | | | | | | | These symbols are universally exposed and documented so declare them centrally. Double- and triple-underscore versions exist on some platforms, but leave those alone for now. Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D42616
* libc: centralize ntoh symbolsBrooks Davis2023-11-151-4/+0
| | | | | | | | These are implemented by net/ntoh.c via headers and compiler intrinsics so declare them in net/Symbol.map. Reviewed by: imp, kib, emaste Differential Revision: https://reviews.freebsd.org/D42615
* libc: further centralize syscall symbolsBrooks Davis2023-11-151-4/+0
| | | | | | | | All architectures necessarily implement _exit(2) and vfork(2) so declare them in sys/Symbol.map. Reviewed by: imp, kib, emaste Differential Revision: https://reviews.freebsd.org/D42614
* libc: Remove empty comments in Symbol.mapBrooks Davis2023-11-152-6/+0
| | | | | | | These were left over from $FreeBSD$ removal. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42612
* libc/<arch>/sys/Makefile.inc: remove cruftBrooks Davis2023-11-151-1/+0
| | | | | | | | Remove stray blank lines left over from $FreeBSD$ removal as well as some CVS-era (perhaps pre-repocopy) version comments. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42611
* libc: Purge unneeded cdefs.hWarner Losh2023-11-0121-21/+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
* libc: Strip plentiful trailing whitespace from aarch64+arm makecontext.cJessica Clarke2023-10-281-5/+5
|
* Restore blank line after #includeJohn Baldwin2023-08-171-0/+1
|
* Remove $FreeBSD$: two-line nroff patternWarner Losh2023-08-162-4/+0
| | | | Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-165-5/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .S patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\s\.(asciz|ident)\s+\"\$FreeBSD\$\".*\n/
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-1644-90/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* Remove $FreeBSD$: one-line .c comment patternWarner Losh2023-08-163-3/+0
| | | | Remove /^/[*/]\s*\$FreeBSD\$.*\n/
* Remove $FreeBSD$: one-line .h patternWarner Losh2023-08-164-4/+0
| | | | Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-163-6/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* gdtoa: Regenerate configuration headers for 32-bit arm.Michal Meloun2023-08-132-11/+9
| | | | | | | | | | | These configuration headers were only guessed, but unfortunately not exactly correctly. Therefore, re-generate them on real HW. Generated on CA15, verified on CA9, CA7(with VFP lite) and on 32-bit ARMv9. PR: 272229 Reported by: Robert Clausecker <fuz@FreeBSD.org> MFC after: 2 weeks
* arm: Remove swi.hAndrew Turner2023-07-241-1/+0
| | | | | | | It has been unneeded since moving to the Arm EABI Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D41136
* lib/libc/string: replace ffs/fls implementations with clang builtinsRobert Clausecker2023-07-032-58/+0
| | | | | | | | | | | | | | Most architectures we support (except for riscv64) have instructions to compute these functions very quickly. Replace old code with the ffs and clz builtin functions, allowing clang to generate good code for all architectures. As a consequence, toss out arm and i386 ffs() implementations. Sponsored by: FreeBSD Foundation Approved by: mhorne MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D40730
* spdx: The BSD-2-Clause-NetBSD identifier is obsolete, drop -NetBSDWarner Losh2023-05-122-2/+2
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-NetBSD 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
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-1210-10/+10
| | | | | | | | | 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-143-5/+4
| | | | | | | | | | | | | 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
* libc: Remove _get_tp() and _set_tp().John Baldwin2021-12-094-91/+0
| | | | | | | | | Their uses have been replaced by _tcb_get() and _tcb_set() from <machine/tls.h>. Reviewed by: kib, jrtc27 Sponsored by: The University of Cambridge, Google Inc. Differential Revision: https://reviews.freebsd.org/D33354
* Add sched_getcpu()Konstantin Belousov2021-11-101-1/+2
| | | | | | | | | for compatibility with Linux. Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D32901
* libc: add _get_tp() private functionKonstantin Belousov2021-04-092-0/+47
| | | | | | | | which returns pointer to tcb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D29623
* Remove the last users of ARM_TP_ADDRESSAndrew Turner2021-04-083-18/+0
| | | | | | | | | This was only needed on 32-bit arm prior to ARMv6. As we only support ARMv6 or later remove it. Reviewed by: mannu Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D29624
* Remove obsolete code gated on _ARM_ARCH_*Andrew Turner2021-01-282-69/+0
| | | | | | | This is all code only run on ARMv4 and ARMv5. Support for these have been dropped from FreeBSD. Differential Revision: https://reviews.freebsd.org/D28314
* Remove the old ARMv4 memcpyAndrew Turner2021-01-283-1652/+1371
| | | | | | | | | This was only used when building for ARMv4 or some ARMv5 or when _STANDALONE is defined. As ARMv4 and ARMv5 support has been removed, and we only define _STANDALONE in the bootloader where we don't use this version of memcpy we can remove it. Differential Revision: https://reviews.freebsd.org/D28313
* Remove leftover big-endian arm supportAndrew Turner2021-01-285-632/+0
| | | | | Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D28312
* arm/ffs.S: remove stale comment.Pedro F. Giffuni2019-12-281-3/+0
| | | | | | | | | We already use the CLZ instruction. Discussed with: andrew Notes: svn path=/head/; revision=356141