summaryrefslogtreecommitdiffstats
path: root/lib/libc/arm
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove part of the NetBSD longjmp code that was not ready to be merged.andrew2013-06-051-2/+1
|
* Start to merge the updated ARM NetBSD setjump/longjmp functions. To beginandrew2013-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.
* The getcontext() from the __fillcontextx() call in thekib2013-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
* When clang builds libc it may insert calls to __aeabi_* functions. Normallyandrew2013-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.
* Rework the __vdso_* symbols attributes to only make the symbols weak,kib2013-01-302-0/+50
| | | | | | | | | | but use normal references instead of weak. This makes the statically linked binaries to use fast gettimeofday(2) by forcing the linker to resolve references and providing the neccessary functions. Reported by: bde Tested by: marius (sparc64) MFC after: 2 weeks
* Add the required __aeabi_* functions to libc.andrew2013-01-197-0/+361
| | | | | The floating point functions are here rather than compiler-rt because the libc softfloat code allows us to set the rounding mode.
* Use the compiler-rt version __{u,}divsi3 and __{u,}modsi3 on ARM EABIandrew2013-01-194-5/+27
|
* Update the syscall calling convention for ARM EABI. We store the syscallandrew2013-01-191-0/+8
| | | | | | in r7 and use ip to store the old version of r7 as it is not guaranteed to be kept when calling a subroutine. The kernel will preserve the register across system calls.
* Silence a clang warning by telling it we are only interested in leftandrew2013-01-061-1/+1
| | | | shifting the lower 32bits of the floating point value when we demangle it.
* Merging of projects/armv6, part 2gonzo2012-08-152-0/+10
| | | | Handle TLS for ARMv6 and ARMv7
* Per kib, since __flt_rounds is being added to FreeBSD 10, itkientzle2012-06-151-0/+3
| | | | | | belongs in FBSD_1.3. MFC after: 1 week
* __flt_rounds is a public symbol (expands from the FLT_ROUNDS macro),kientzle2012-06-141-1/+1
| | | | | | | | | | so include it in the public namespace on arm just as with other architectures. This corrects r236816. Submitted by: Jan Sieka MFC after: 1 week
* __flt_rounds was omitted from the exported symbols here.kientzle2012-06-091-0/+1
| | | | | | Submitted by: Jan Sieka Reviewed by: arm@ MFC after: 1 week
* Replace the C implementation of __aeabi_read_tp with an assembly version.andrew2012-04-162-14/+9
| | | | | | This ensures we follow the ABI by preserving registers r1-r3. Reviewed by: jmallett, imp
* Unlike other functions __aeabi_read_tp function must preserve r1-r3. Theandrew2012-04-081-2/+5
| | | | | | | currently generated code clobbers r3. Fix this by loading ARM_TP_ADDRESS using inline assembly. Approved by: imp (mentor)
* - Revert part of r234005, which I did not intend to commit.stas2012-04-071-1/+1
| | | | Sorry! :(
* - Add kernel config file for QEMU-emulated gumstix board.stas2012-04-071-1/+1
|
* Unbreak trhe build by including proper headergonzo2012-03-181-1/+1
|
* Fix TLS for statically linked binariesgonzo2012-03-181-0/+4
| | | | Approved by: cognet
* Add __aeabi_read_tp to the symbol list.cognet2012-03-041-0/+1
|
* Add __aeabi_read_tp function required for thread-local storagegonzo2012-02-142-1/+43
| | | | Reviewed by: cognet
* Make the sys/ucontext.h self-contained by changing the return typekib2012-02-011-1/+1
| | | | | | | of __getcontextx_size(3) from size_t to int. PR: ports/164654 MFC after: 1 month
* Add API for obtaining extended machine context states that cannot bekib2012-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
* Don't inline fenv.h functions on arm for now. Inlining makes sense:das2012-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.
* Implement FLT_ROUNDS for arm. Some (all?) arm FPUs lack support fordas2012-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
* Convert softfloat to use the standard exception flag and rounding macrosdas2012-01-161-14/+14
| | | | | | in fenv.h instead of the non-standard and incomplete ones in ieeefp.h. Thanks to Ian Lepore for testing this patch.
* Correct some bugs that resulted from arm/_fpmath.h being blindly copieddas2012-01-161-1/+2
| | | | | | | from the x86 version, which has a completely different long double format. Submitted by: Maks Verver
* Merge index() and strchr() together.ed2012-01-031-4/+3
| | | | | | | | | | | | | | | | | As I looked through the C library, I noticed the FreeBSD MIPS port has a hand-written version of index(). This is nice, if it weren't for the fact that most applications call strchr() instead. Also, on the other architectures index() and strchr() are identical, meaning we have two identical pieces of code in the C library and statically linked applications. Solve this by naming the actual file strchr.[cS] and let it use __strong_reference()/STRONG_ALIAS() to provide the index() routine. Do the same for rindex()/strrchr(). This seems to make the C libraries and static binaries slightly smaller, but this reduction in size seems negligible.
* Replace a proliferation of buggy MD implementations of modf() with adas2011-10-213-109/+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.
* Fix typos - remove duplicate "the".brucec2011-02-211-1/+1
| | | | | | PR: bin/154928 Submitted by: Eitan Adler <lists at eitanadler.com> MFC after: 3 days
* The NetBSD Foundation has granted permission to remove clause 3 and 4 fromjoel2010-03-024-28/+0
| | | | | | their software. Obtained from: NetBSD
* Remove unneeded stdlib directories.ed2009-06-231-4/+0
| | | | | | | It's not necessary to add stdlib directories for each architecture, even if the architecture doesn't implement any files of its own. Submitted by: Christoph Mallon
* - Eliminate extra subcs instruction. I have not noticed before that westas2009-06-211-2/+1
| | | | | always perform substraction now, so no instruction could be rordered to eliminate the conditional substraction.
* - Fix strncmp on arm. Return 0 as result without performing thestas2009-06-211-5/+9
| | | | | | | | main cycle only if the len passed is equal to 0. If end address overflows use last possible address as the end address. Based on: discussion on arm@ MFC after: 1 month
* Use GCC's __SOFTFP__ to test whether we're being compiledmarcel2009-05-313-10/+8
| | | | | with softfloat or not. Now -msoft-float can be overridden more easily.
* revert r191633; this breaks at91 & xscale (likely all arm)sam2009-05-061-4/+4
|
* Change the test at the beginning of strncmp(), from being if (len - 1) < 0cognet2009-04-281-4/+4
| | | | | | | | | to if (len == 0). The length is supposed to be unsigned, so len - 1 < 0 won't happen except if len == 0 anyway, and it would return 0 when it shouldn't, if len was > INT_MAX. Spotted out by: Channa <channa kad gmail com>
* These warnings are only relevant on NetBSD it seems. They don't seemimp2009-02-191-3/+0
| | | | to be relevant to FreeBSD at all.
* Add support for the FPA floating-point format on ARM. Themarcel2008-12-232-3/+14
| | | | | | | | | FPA floating-point format is identical to the VFP format, but is always stored in big-endian. Introduce _IEEE_WORD_ORDER to describe the byte-order of the FP representation. Obtained from: Juniper Networks, Inc
* Mark uname(), getdomainname() and setdomainname() with COMPAT_FREEBSD4.ed2008-11-091-2/+1
| | | | | | | | | | | | | | | | | | | | | Looking at our source code history, it seems the uname(), getdomainname() and setdomainname() system calls got deprecated somewhere after FreeBSD 1.1, but they have never been phased out properly. Because we don't have a COMPAT_FREEBSD1, just use COMPAT_FREEBSD4. Also fix the Linuxolator to build without the setdomainname() routine by just making it call userland_sysctl on kern.domainname. Also replace the setdomainname()'s implementation to use this approach, because we're duplicating code with sysctl_domainname(). I wasn't able to keep these three routines working in our COMPAT_FREEBSD32, because that would require yet another keyword for syscalls.master (COMPAT4+NOPROTO). Because this routine is probably unused already, this won't be a problem in practice. If it turns out to be a problem, we'll just restore this functionality. Reviewed by: rdivacky, kib
* Let libstand(3) build on ARM.raj2008-10-141-0/+4
| | | | This is a pre-requisite for loader(8) + U-Boot support library on this arch.
* Arrange so that the NaN returned by strtod("nan", NULL) is the same asdas2007-12-161-4/+4
| | | | the NaN returned by strtod("nan()", NULL).
* Unbreak arm build by removing duplicate symbols.cognet2007-10-181-8/+0
|
* MFKernel: do not use __XSCALE__ to detect if clz/pld/ldrd/strd arecognet2007-10-133-9/+9
| | | | | | available, use _ARM_ARCH_5/_ARM_ARCH_5E instead. MFC After: 3 days
* Fix remaining syntax errors (missing semicolons)peter2007-07-051-2/+2
| | | | | Submitted by: Björn König <bkoenig@cs.tu-berlin.de> Approved by: re (kensmith, followup commits)
* Add missing \ characters in PSEUDO() macro on arm. Oops.peter2007-07-041-2/+2
| | | | | Submitted by: cognet Approved by: re (kensmith)
* Classify mmap, lseek, pread, pwrite, truncate, ftruncate as pseudopeter2007-07-041-3/+6
| | | | | | | | | | syscalls, unless WITHOUT_SYSCALL_COMPAT is defined. The default case will have the .c wrappers still. If you define WITHOUT_SYSCALL_COMPAT, the .c wrappers will go away and libc will make direct syscalls. After 7-stable starts, the direct syscall method will be default. Approved by: re (kensmith)
* Adjust the syscall stub macros to be consistent in their meaning. Inpeter2007-07-041-14/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | particular: SYSCALL() makes a syscall, with errno handling, and continues execution directly after the macro in the non-error case. RSYSCALL() is just like SYSCALL(), but returns after success. Both SYSCALL(name) and RSYSCALL(name) export "__sys_name" as a strong symbol, with "_name" and "name" as weak aliases. PSEUDO() is just like RSYSCALL(), but skipping the "name" weak alias. It still does "__sys_name" and "_name". Change i386 to add errno handling to PSEUDO. The same for amd64 and sparc64, with appear to have copied the behavior. ia64 was correct (as was alpha). Just remove some apparently unused variants of the macros. (untested!) I believe powerpc is correct. Fix arm to not export "name" from the PSEUDO case. Remove apparently extra unused variants. (untested!) The errno problem manifested on i386/amd64/sparc64 by having "PSEUDO" classified syscalls return without setting errno. eg: "addr = mmap()" could return with "addr" = 22 instead of setting errno to 22 and returning -1. Approved by: re (kensmith)
* Fix sbrk.S to use _end symbol the same way brk.s was fixed some timekan2007-06-271-2/+2
| | | | | | | ago. sbrk.S should have gotten the same change then but was forgotten. Approved by: re (bmah) PR: kern/114049
* Some libc symbol map cleanups.deischen2007-05-311-4/+0
| | | | | | | | | | | | | | | | | | | | | net: endhostdnsent is named _endhostdnsent and is private to netdb family of functions. posix1e: acl_size.c has been never compiled in, so there's no "acl_size". rpc: "getnetid" is a static function. stdtime: "gtime" is #ifdef'ed out in the source. some symbols are specific only to some architectures, e.g., ___tls_get_addr is only defined on i386. __htonl, __htons, __ntohl and __ntohs are no longer functions, they are now (internal) defines in <machine/endian.h>. Submitted by: ru
OpenPOWER on IntegriCloud