aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/arm/gen
Commit message (Collapse)AuthorAgeFilesLines
* Restore blank line after #includeJohn Baldwin2023-08-231-0/+1
| | | | (cherry picked from commit ece58eaf500974ba4ab1b56420414bf971a17ef7)
* Remove $FreeBSD$: two-line nroff patternWarner Losh2023-08-232-4/+0
| | | | | | | Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/ Similar commit in main: (cherry picked from commit fa9896e082a1)
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-231-1/+0
| | | | | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/ Similar commit in main: (cherry picked from commit d0b2dbfa0ecf)
* Remove $FreeBSD$: one-line .S patternWarner Losh2023-08-231-2/+0
| | | | | | | Remove /^\s\.(asciz|ident)\s+\"\$FreeBSD\$\".*\n/ Similar commit in main: (cherry picked from commit b1cfcffa89e6)
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-2322-46/+0
| | | | | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/ Similar commit in main: (cherry picked from commit 1d386b48a555)
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-231-2/+0
| | | | | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/ Similar commit in main: (cherry picked from commit b3e7694832e8)
* spdx: The BSD-2-Clause-NetBSD identifier is obsolete, drop -NetBSDWarner Losh2023-07-252-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 (cherry picked from commit b61a573019428cbdc38ed03be9ecd2482011ea66)
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-07-255-5/+5
| | | | | | | | | | | 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 (cherry picked from commit 4d846d260e2b9a3d4d0a701462568268cbfe7a5b)
* libc: add _get_tp() private functionKonstantin Belousov2021-04-232-0/+52
| | | | (cherry picked from commit 06d8a116bd6b6f70b8aedc6a6a2c4085c53f63ac)
* armv6 soft float build fixedWarner Losh2019-11-142-4/+4
| | | | | | | | | | | 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
* Add arm_sync_icache() and arm_drain_writebuf() sysarch syscall wrappers.Ian Lepore2019-07-135-0/+245
| | | | | | | | | | | | | | | | NetBSD and OpenBSD have libc wrapper functions for the ARM_SYNC_ICACHE and ARM_DRAIN_WRITEBUF sysarch operations. This change adds compatible functions to our library. This should make it easier for various upstream sources to support *BSD operating systems with a single variation of cache maintence code in tools like interpreters and JIT compilers. I consider the argument types passed to arm_sync_icache() to be especially unfortunate, but this is intended to match the other BSDs. Differential Revision: https://reviews.freebsd.org/D20906 Notes: svn path=/head/; revision=349972
* Reorganize the SRCS lists as one file per line, and then alphabetize them.Ian Lepore2019-07-101-6/+24
| | | | | | | No functional changes. Notes: svn path=/head/; revision=349891
* libc: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-256-1/+13
| | | | | | | | | | | | | | | 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
* spdx: initial adoption of licensing ID tags.Pedro F. Giffuni2017-11-181-1/+3
| | | | | | | | | | | | | | | | | | | | 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. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Initially, only tag files that use BSD 4-Clause "Original" license. RelNotes: yes Differential Revision: https://reviews.freebsd.org/D13133 Notes: svn path=/head/; revision=325966
* Save VFP state in getcontext(3) on ARM.Michal Meloun2017-10-162-1/+100
| | | | | | | | | | | This is a last followup of r315974, which fixes userland part of VFP save/restore problems described in PR 217611. PR: 217611 MFC after: 2 weeks Notes: svn path=/head/; revision=324660
* Support armv7 builds for userlandWarner Losh2017-10-051-1/+1
| | | | | | | | | | | | | | | | | | | 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
* Start to remove _libc_arm_fpu_present checks. We don't support the VFP onAndrew Turner2017-06-292-50/+10
| | | | | | | | | | | | | ARMv4 or ARMv5, and only support it when it's present on ARMv6 and later. As such always store the VFP register in setjmp and restore them in longjmp when building for armv6. Reviewed by: mmel Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D11393 Notes: svn path=/head/; revision=320470
* Make armv6 hard float abi by default. Kill armv6hf.Warner Losh2016-05-181-1/+1
| | | | | | | | | | 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
* Annotate arm userspace assembler sources stating their tolerance toKonstantin Belousov2015-09-297-0/+13
| | | | | | | | | | the non-executable stack. Reviewed by: andrew Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=288373
* Add include for declaration of _set_tp(). Eliminates -Wmissing-prototypes ↵Craig Rodrigues2015-09-201-0/+1
| | | | | | | warnings. Notes: svn path=/head/; revision=288019
* Remove __ARM_EABI__ from more places in libc as this is the only ARM ABIAndrew Turner2015-05-312-15/+7
| | | | | | | we support. Notes: svn path=/head/; revision=283824
* Teach bits of libc about Thumb. This adds the if-then instructions neededAndrew Turner2015-05-122-2/+32
| | | | | | | | | | | | 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
* Remove duplicate copies of trivial getcontextx.cEd Maste2015-01-122-78/+3
| | | | | | | | | | | | | Only i386 and amd64 provide a non-trivial __getcontextx(). Use a common trivial implementation in gen/ for other architectures, rather than copying the file to each MD subdirectory. Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1472 Notes: svn path=/head/; revision=277078
* Remove MK_ARM_EABI, the armeb issues have been fixed. The code to supportAndrew Turner2014-10-011-4/+0
| | | | | | | | | | | | | | | the oabi is still in the tree, but it is expected this will be removed as developers work on surrounding code. With this commit the ARM EABI is the only supported supported ABI by FreeBSD on ARMa 32-bit processors. X-MFC after: never Relnotes: yes Differential Revision: https://reviews.freebsd.org/D876 Notes: svn path=/head/; revision=272350
* In ARM asm code, ensure that every ENTRY(foo) has a matching END(foo).Ian Lepore2014-08-317-1/+13
| | | | | | | | | | | | The EABI unwind info requires a .fnend for every .fnstart, and newer binutils will complain about seeing two .fnstart in a row. This change allows newer tools to compile our code. Reported by: bapt Reviewed by: imp Notes: svn path=/head/; revision=270882
* Set the new floating point exception mask correctlyAndrew Turner2014-04-281-1/+1
| | | | | | | Submitted by: Keith White <kwhite@site.uottawa.ca> Notes: svn path=/head/; revision=265059
* Rename the fp{get,set}* files so they no longer conflict with the softfloatAndrew Turner2014-04-217-2/+2
| | | | | | | | version of these files. Keep them within this directory so they can be used to implement the armv6 version of these functions. Notes: svn path=/head/; revision=264721
* Add the deprecated fp{get,set}* functions, a few ports use them.Andrew Turner2014-04-207-0/+304
| | | | Notes: svn path=/head/; revision=264696
* Implement __flt_rounds for ARMv6 hard-float. The fpscr register stores theAndrew Turner2014-03-221-10/+14
| | | | | | | current rounding mode used by the VFP unit. Notes: svn path=/head/; revision=263631
* Teach siglongjmp about the VFP version of the setjmp buffer.Andrew Turner2013-07-211-3/+5
| | | | | | | | This fixes a bug where a call to sigsetjmp followed by siglongjmp may fail when run on a machine with VFP enabled. Notes: svn path=/head/; revision=253518
* Finish pulling in the NetBSD setjmp/longjmp updates on ARM.Andrew Turner2013-06-074-4/+162
| | | | | | | | | | | Store/restore the VFP registers in setjmp/longjmp on ARM EABI if VFP is enabled in the kernel. It checks the hw.floatingpoint sysctl to see if floating-point is available and uses this to determine if it should store them. If it does it uses a different magic value so longjmp is able to know if it should load them. Notes: svn path=/head/; revision=251514
* Include machine/setjmp.h to get the definition of _JB_MAGIC__SETJMP. ThisAndrew Turner2013-06-071-1/+3
| | | | | | | allows us to remove it from the ARM copy of machine/asm.h. Notes: svn path=/head/; revision=251509
* Remove part of the NetBSD longjmp code that was not ready to be merged.Andrew Turner2013-06-051-2/+1
| | | | Notes: svn path=/head/; revision=251405
* Start to merge the updated ARM NetBSD setjump/longjmp functions. To beginAndrew Turner2013-06-042-75/+52
| | | | | | | | | | | | | with merge the functions but leave out the code to save/load the VFP registers as that requires other changes to ensure the VFP is enabled first. This removes storing the old fpa registers. These were never fully supported, and the only user of this code I can find have moved to newer CPUs which use a VFP. Notes: svn path=/head/; revision=251392
* The getcontext() from the __fillcontextx() call in theKonstantin Belousov2013-05-281-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | check_deferred_signal() returns twice, since handle_signal() emulates the return from the normal signal handler by sigreturn(2)ing the passed context. Second return is performed on the destroyed stack frame, because __fillcontextx() has already returned. This causes undefined and bad behaviour, usually the victim thread gets SIGSEGV. Avoid nested frame and the need to return from it by doing direct call to getcontext() in the check_deferred_signal() and using a new private libc helper __fillcontextx2() to complement the context with the extended CPU state if the deferred signal is still present. The __fillcontextx() is now unused, but is kept to allow older libthr.so to be used with the new libc. Mark __fillcontextx() as returning twice [1]. Reported by: pgj Pointy hat to: kib Discussed with: dim Tested by: pgj, dim Suggested by: jilles [1] MFC after: 1 week Notes: svn path=/head/; revision=251047
* Use the compiler-rt version __{u,}divsi3 and __{u,}modsi3 on ARM EABIAndrew Turner2013-01-191-1/+5
| | | | Notes: svn path=/head/; revision=245651
* Merging of projects/armv6, part 2Oleksandr Tymoshenko2012-08-152-0/+10
| | | | | | | Handle TLS for ARMv6 and ARMv7 Notes: svn path=/head/; revision=239271
* Replace the C implementation of __aeabi_read_tp with an assembly version.Andrew Turner2012-04-162-14/+9
| | | | | | | | | This ensures we follow the ABI by preserving registers r1-r3. Reviewed by: jmallett, imp Notes: svn path=/head/; revision=234337
* Unlike other functions __aeabi_read_tp function must preserve r1-r3. TheAndrew Turner2012-04-081-2/+5
| | | | | | | | | | currently generated code clobbers r3. Fix this by loading ARM_TP_ADDRESS using inline assembly. Approved by: imp (mentor) Notes: svn path=/head/; revision=234014
* - Revert part of r234005, which I did not intend to commit.Stanislav Sedov2012-04-071-1/+1
| | | | | | | Sorry! :( Notes: svn path=/head/; revision=234006
* - Add kernel config file for QEMU-emulated gumstix board.Stanislav Sedov2012-04-071-1/+1
| | | | Notes: svn path=/head/; revision=234005
* Unbreak trhe build by including proper headerOleksandr Tymoshenko2012-03-181-1/+1
| | | | Notes: svn path=/head/; revision=233107
* Fix TLS for statically linked binariesOleksandr Tymoshenko2012-03-181-0/+4
| | | | | | | Approved by: cognet Notes: svn path=/head/; revision=233106
* Add __aeabi_read_tp function required for thread-local storageOleksandr Tymoshenko2012-02-142-1/+43
| | | | | | | Reviewed by: cognet Notes: svn path=/head/; revision=231616
* Make the sys/ucontext.h self-contained by changing the return typeKonstantin Belousov2012-02-011-1/+1
| | | | | | | | | | of __getcontextx_size(3) from size_t to int. PR: ports/164654 MFC after: 1 month Notes: svn path=/head/; revision=230864
* Add API for obtaining extended machine context states that cannot beKonstantin Belousov2012-01-212-1/+70
| | | | | | | | | | | | | | fit into existing mcontext_t. On i386 and amd64 do return the extended FPU states using getcontextx(3). For other architectures, getcontextx(3) returns the same information as getcontext(2). Tested by: pho MFC after: 1 month Notes: svn path=/head/; revision=230429
* Don't inline fenv.h functions on arm for now. Inlining makes sense:David Schultz2012-01-201-0/+2
| | | | | | | | | | | the function bodies require only 2 to 10 instructions. However, it leads to application binaries that refer to a private ABI, namely, the softfloat innards in libc. This could complicate future changes in the implementation of the floating-point emulation layer, so it seems best to have programs refer to the official fe* entry points in libm. Notes: svn path=/head/; revision=230367
* Implement FLT_ROUNDS for arm. Some (all?) arm FPUs lack support forDavid Schultz2012-01-162-1/+64
| | | | | | | | | | | dynamic rounding modes, but FPUless chips that use softfloat can support it because everything is emulated anyway. (We presently have incomplete support for hardware FPUs.) Submitted by: Ian Lepore Notes: svn path=/head/; revision=230191
* Replace a proliferation of buggy MD implementations of modf() with aDavid Schultz2011-10-212-108/+1
| | | | | | | | | | working MI one. The MI one only needs to be overridden on machines with non-IEEE754 arithmetic. (The last supported one was the VAX.) It can also be overridden if someone comes up with a faster one that actually passes the regression tests -- but this is harder than it sounds. Notes: svn path=/head/; revision=226606
* Fix typos - remove duplicate "the".Rebecca Cran2011-02-211-1/+1
| | | | | | | | | PR: bin/154928 Submitted by: Eitan Adler <lists at eitanadler.com> MFC after: 3 days Notes: svn path=/head/; revision=218909