summaryrefslogtreecommitdiffstats
path: root/lib/libc/powerpc64
Commit message (Collapse)AuthorAgeFilesLines
* MFC r314556-r314558brooks2017-03-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r314556: Correct MDSRCS use in <arch>/string/Makefile.inc. - Remove .c files which duplicate entries in MISRCS. - Use the same, less merge conflict prone style in all cases. - Use MDSRCS for mips (.c and .S files both ended up in SRCS). - Remove pointless sparc64 Makefile.inc. - Remove uninformative foreign VCS ID entries. Reviewed by: emaste, imp, jhb MFC after: 1 week Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9841 r314557: Correct an misunderstanding of MDSRCS. MDSRCS it intended to allow assembly versions of funtions with C implementations listed in MISRCS. The selection of the correct machdep_ldis?.c for a given architecture does not follow this pattern and the file should be added to SRCS directly. Reviewed by: emaste, imp, jhb MFC after: 1 week Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9841 r314558: Garbage collect unused gdtoa related files on mips. Reviewed by: emase, imp, jhb MFC after: 1 week Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9841
* MFC r304928:kib2016-09-032-69/+1
| | | | | | | | | | | | | Do not obliterate errno value in the main thread during ptrace(2) call on x86. MFC r304931: Follow ABI when calling __error from the ptrace(2) wrapper. MFC r305012: Rewrite ptrace(2) wrappers in C. MFC r305022: Restore the requirement of setting errno to zero before calling ptrace(2).
* Replace use of the pipe(2) system call with pipe2(2) with a zero flagsbrooks2016-06-222-55/+1
| | | | | | | | | | | | | | | | value. This eliminates the need for machine dependant assembly wrappers for pipe(2). It also make passing an invalid address to pipe(2) return EFAULT rather than triggering a segfault. Document this behavior (which was already true for pipe2(2), but undocumented). Reviewed by: andrew Approved by: re (gjb) Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D6815
* 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.
* libc: stop exporting cerroremaste2016-03-301-1/+0
| | | | | | | | | | i386 stopped exporting .cerror in r240152, and likewise for amd64 in r240178. It is not used by other libraries on any platform, so apply the same change to the remaining architectures. Reviewed by: jhibbits, jilles Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D5774
* libc: stop exporting curbrk and minbrk in the private namespaceemaste2016-03-241-2/+0
| | | | | | | | | They are not used anywhere else in the base system and are an internal implementation detail that does not need to be exposed. Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D5728
* Make unions in PowerPC libc endian-safe.nwhitehorn2016-02-262-2/+22
|
* Add include for declaration of _set_tp(). Eliminates -Wmissing-prototypes ↵rodrigc2015-09-201-0/+1
| | | | warnings.
* The lseek(2), mmap(2), truncate(2), ftruncate(2), pread(2), andkib2015-04-181-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | pwrite(2) syscalls are wrapped to provide compatibility with pre-7.x kernels which required padding before the off_t parameter. The fcntl(2) contains compatibility code to handle kernels before the struct flock was changed during the 8.x CURRENT development. The shims were reasonable to allow easier revert to the older kernel at that time. Now, two or three major releases later, shims do not serve any purpose. Such old kernels cannot handle current libc, so revert the compatibility code. Make padded syscalls support conditional under the COMPAT6 config option. For COMPAT32, the syscalls were under COMPAT6 already. Remove WITHOUT_SYSCALL_COMPAT build option, which only purpose was to (partially) disable the removed shims. Reviewed by: jhb, imp (previous versions) Discussed with: peter Sponsored by: The FreeBSD Foundation MFC after: 1 week
* libc: Eliminate duplicate copies of __vdso_gettc.cemaste2015-04-022-49/+1
| | | | | Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2152
* 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-0110-0/+13
| | | | | | | It allows to build with newer binutils Differential Revision: https://reviews.freebsd.org/D877 Reviewed by: jhibbits
* Convert from WITHOUT_SYSCALL_COMPAT to MK_SYSCALL_COMPAT.imp2014-04-051-1/+1
|
* Replace use of ${.CURDIR} by ${LIBC_SRCTOP} and define ${LIBC_SRCTOP}marcel2014-03-041-1/+1
| | | | | | | | | | | 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.
* Get rid of the CONCAT macro.andreast2013-11-231-10/+10
|
* 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
* 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
* 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-052-17/+17
| | | | | | | | | 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
* This commit adds profiling support for powerpc64. Now we can do applicationandreast2012-01-201-1/+1
| | | | | | | | | | | | | profiling and kernel profiling. To enable kernel profiling one has to build kgmon(8). I will enable the build once I managed to build and test powerpc (32-bit) kernels with profiling support. - add a powerpc64 PROF_PROLOGUE for _mcount. - add macros to avoid adding the PROF_PROLOGUE in certain assembly entries. - apply these macros where needed. - add size information to the MCOUNT function. MFC after: 3 weeks, together with r230291
* Two other places where we can use WEAK_ALIAS.andreast2012-01-081-4/+1
|
* Use the macro WEAK_ALIAS. Tested on 32 and 64-bit.andreast2012-01-061-10/+5
|
* 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
* Turn off default generation of userland dot symbols on powerpc64 now thatnwhitehorn2011-02-188-22/+13
| | | | | 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-1412-1/+22
| | | | Reviewed and tested by: nwhitehorn
* Fix stack alignment (required to be to 16 bytes) instead of ptrace andnwhitehorn2010-12-112-5/+5
| | | | cerror on powerpc64.
* Make sure to specify the alignment of minbrk and curbrk. They were correctlydim2010-11-112-0/+2
| | | | | | | | aligned by accident with earlier binutils, but no longer are, causing link failures. Submitted by: nwhitehorn Obtained from: projects/binutils-2.17
* Provide 64-bit PowerPC support in libc.nwhitehorn2010-07-1035-0/+2433
Obtained from: projects/ppc64
OpenPOWER on IntegriCloud