summaryrefslogtreecommitdiffstats
path: root/lib/libc/powerpc64/gen
Commit message (Collapse)AuthorAgeFilesLines
* libc: make some more use of the nitems() macro.pfg2016-04-161-2/+2
| | | | | | | | We have an nitems() macro in the <sys/param.h> header that is convenient to re-use as it makes things easier to read. Given that it is available already without adding additional headers and other parts of libc already use it, extend a bit more its use.
* Make unions in PowerPC libc endian-safe.nwhitehorn2016-02-261-2/+15
|
* Add include for declaration of _set_tp(). Eliminates -Wmissing-prototypes ↵rodrigc2015-09-201-0/+1
| | | | warnings.
* Save and restore non-volatile floating-point registers during longjmp().nwhitehorn2015-03-083-0/+110
| | | | | | | | | | | This should also save and restore non-volatile Altivec registers, but that needs to wait on solving two problems: 1. Adding the nonvolatile vector registers means we need 5 more than _JBLEN entries in jmp_buf on 32-bit targets (64-bit is OK). 2. Need to figure out how to determine if saving/restoring vector regs is supported on the current CPU from userland. MFC after: 1 month
* Remove duplicate copies of trivial getcontextx.cemaste2015-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
* Avoid use of register variables. Clang 3.5 treats this as undefined behavior,jhibbits2015-01-061-2/+1
| | | | | | and bad things happen. MFC after: 1 week
* Ensure that every ENTRY(foo) has a matching END(foo).bapt2014-10-015-0/+8
| | | | | | | It allows to build with newer binutils Differential Revision: https://reviews.freebsd.org/D877 Reviewed by: jhibbits
* Revert r253748,253749avg2013-07-281-0/+1
| | | | | | This WIP should not have been committed yet. Pointyhat to: avg
* remove needless inclusion of machine/cpu.h in userlandavg2013-07-281-1/+0
| | | | MFC after: 21 days
* Remove clause 3 and 4 from TNF licensesemaste2013-05-295-35/+0
| | | | | | | Per the NetBSD Foundation statement Third parties are encouraged to change the license on any files which have a 4-clause license contributed to the NetBSD Foundation to a 2-clause license.
* 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
* Do not restore the register holding the TLS pointer when doing variousnwhitehorn2012-04-113-3/+0
| | | | | | | | | | usermode context switches (long jumps and ucontext operations). If these are used across threads, multiple threads can end up with the same TLS base. Madness will then result. This makes behavior on PPC match that on x86 systems and on Linux. MFC after: 10 days
* Properly resolve the _ctx_start function descriptor (the symbol _ctx_startnwhitehorn2012-04-071-1/+1
| | | | | | | is a descriptor, not a code address), which prevents crashes when starting a context. This fixes QEMU on powerpc64. MFC after: 3 days
* Replace the assembler macro WEAK_ALIAS with a new macro WEAK_REFERENCE whichandreast2012-02-051-1/+1
| | | | | | | | | has the same API as __weak_reference(). Give 'x' in SYS.h a more meaningful name. Tested on 32- and 64-bit PowerMac. Reviewed by: bde
* 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
* Two other places where we can use WEAK_ALIAS.andreast2012-01-081-4/+1
|
* Replace a proliferation of buggy MD implementations of modf() with adas2011-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.
* 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
* Turn off default generation of userland dot symbols on powerpc64 now thatnwhitehorn2011-02-181-2/+3
| | | | | we have a binutils that supports it. Kernel dot symbols remain on to assist DDB.
* Mark assembler sources from libc as working with non-executable stack.kib2011-01-145-0/+9
| | | | Reviewed and tested by: nwhitehorn
* Provide 64-bit PowerPC support in libc.nwhitehorn2010-07-1018-0/+1318
Obtained from: projects/ppc64
OpenPOWER on IntegriCloud