summaryrefslogtreecommitdiffstats
path: root/lib/libc/powerpc
Commit message (Collapse)AuthorAgeFilesLines
* 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-9/+9
|
* 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
* 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
* Doh... Don't add __eabi to an old version tag (i.e. FBSD_1.0). Add it to themarcel2012-05-251-1/+4
| | | | | | current one (= FBSD_1.3). Pointed out by: kib
* Allow building for the PowerPC EABI by providing a dummy __eabi()marcel2012-05-243-1/+35
| | | | | | | function. The purpose of the __eabi() function is to set up the runtime and is called first thing by main(). The runtime is already set up for us prior to caling main, so there's nothing to do for us in the EABI case.
* 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
* 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
* Two other places where we can use WEAK_ALIAS.andreast2012-01-081-2/+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
* Mark assembler sources from libc as working with non-executable stack.kib2011-01-1412-1/+22
| | | | Reviewed and tested by: nwhitehorn
* The NetBSD Foundation has granted permission to remove clause 3 and 4 fromjoel2010-03-025-35/+0
| | | | | | their software. Obtained from: NetBSD
* 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
* Fix some ifdef logic in the libc syncicache() bit that I somehow missed in thenwhitehorn2008-09-241-1/+3
| | | | last commit. Now it really can use a runtime-set cacheline size.
* Allow the cacheline size on PowerPC to be set at runtime. This is essential fornwhitehorn2008-09-241-16/+16
| | | | | supporting 64-bit CPUs, which often have 128-byte cache lines instead of the standard 32.
* Add support files for compiling with soft-float. This has beenmarcel2008-04-273-0/+448
| | | | | copied from ARM and modified to warrant the duplication. Oh, and to make it work for PowerPC :-)
* Let PowerPC world optionally build with -msoft-float. For FPU-less PowerPCraj2008-02-246-0/+12
| | | | | | | | | variations (e500 currently), this provides a gcc-level FPU emulation and is an alternative approach to the recently introduced kernel-level emulation (FPU_EMU). Approved by: cognet (mentor) MFp4: e500
* Fix build from errors exposed with recent version_gen.awk commit.grehan2007-10-181-2/+1
| | | | | Not quite sure if this is 100% correct: awaiting review. But quieten tinderbox in the meantime.
* Classify mmap, lseek, pread, pwrite, truncate, ftruncate as pseudopeter2007-07-041-4/+5
| | | | | | | | | | 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)
* Fix bogon in previous commit: <machine/cpu.h> is still needed.marcel2007-06-101-0/+1
|
* The definition of CACHELINESIZE moved from <machine/cpu.h> tomarcel2007-06-101-1/+1
| | | | <machine/md_var.h>.
* 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
* I guess powerpc needs vfork(), add it to the symbol list.deischen2007-05-141-0/+1
| | | | Submitted by: marius
* Remove .mcount from gmon's Symbol map and add it to the appropriatedeischen2007-05-131-0/+1
| | | | | | | arch. It can be named differently depending on the arch (.mcount, _mcount). Submitted by: marius
* Use C comments since we now preprocess these files with CPP.deischen2007-04-291-9/+11
|
* The distinction between quiet and signaling NaN formats isdas2007-01-031-0/+21
| | | | | machine-dependent; these files tell the latest version of gdtoa what to do.
* Instead of re-implementing hton[ls] and friends for each arch, add a new MIcognet2006-11-065-158/+0
| | | | | | | file, net/ntoh.c, which just implement them using the inline functions from <sys/endian.h>. Suggested by: bde
* Whitespace fix.marcel2006-09-021-1/+1
|
* Avoid dead code elimination of the assignment to TP by using inlinemarcel2006-08-301-2/+2
| | | | assembly.
* Add each directory's symbol map file to SYM_MAPS.deischen2006-03-131-1/+1
|
* Add symbol maps and initial symbol version definitions to libc.deischen2006-03-131-0/+60
| | | | Reviewed by: davidxu
* Remove fpsetsticky(). This was added for SysV compatibility, but duedas2005-03-152-58/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to mistakes from day 1, it has always had semantics inconsistent with SVR4 and its successors. In particular, given argument M: - On Solaris and FreeBSD/{alpha,sparc64}, it clobbers the old flags and *sets* the new flag word to M. (NetBSD, too?) - On FreeBSD/{amd64,i386}, it *clears* the flags that are specified in M and leaves the remaining flags unchanged (modulo a small bug on amd64.) - On FreeBSD/ia64, it is not implemented. There is no way to fix fpsetsticky() to DTRT for both old FreeBSD apps and apps ported from other operating systems, so the best approach seems to be to kill the function and fix any apps that break. I couldn't find any ports that use it, and any such ports would already be broken on FreeBSD/ia64 and Linux anyway. By the way, the routine has always been undocumented in FreeBSD, except for an MLINK to a manpage that doesn't describe it. This manpage has stated since 5.3-RELEASE that the functions it describes are deprecated, so that must mean that functions that it is *supposed* to describe but doesn't are even *more* deprecated. ;-) Note that fpresetsticky() has been retained on FreeBSD/i386. As far as I can tell, no other operating systems or ports of FreeBSD implement it, so there's nothing for it to be inconsistent with. PR: 75862 Suggested by: bde
* Define LDBL_NBIT to be a mask indicating the position of the integerdas2005-03-071-0/+1
| | | | | | | | bit in a long double. For architectures that don't have such a bit, LDBL_NBIT is 0. This makes it possible to say `mantissa & ~LDBL_NBIT' in places that previously used an #ifdef to select the right expression. The optimizer should dispense with the extra arithmetic when LDBL_NBIT is 0.
* Update my email address.das2005-02-061-1/+1
|
* Replace the ldexp() implementation in libc with a renamed copy of thedas2005-01-221-155/+0
| | | | | | | | | | | | | | | | scalbn() implementation from libm. (The two functions are defined to be identical, but ldexp() lives in libc for backwards compatibility.) The old ldexp() implementation... - was more complicated than this one - set errno instead of raising FP exceptions - got some corner cases wrong (e.g. ldexp(1.0, 2000) in round-to-zero mode) The new implementation lives in libc/gen instead of libc/$MACHINE_ARCH/gen, since we don't need N copies of a machine-independent file. The amd64 and i386 platforms retain their fast and correct MD implementations and override this one.
* Add a file missed in the previous commit:das2005-01-151-0/+5
| | | | | | Eliminate gdtoa.mk and move its contents to ${MACHINE_ARCH}/Makefile.inc. The purpose of having a separate file involved an abandoned scheme that would have kept contrib/gdtoa out of the include path for the rest of libc.
* Eliminate gdtoa.mk and move its contents to ${MACHINE_ARCH}/Makefile.inc.das2005-01-151-4/+0
| | | | | The purpose of having a separate file involved an abandoned scheme that would have kept contrib/gdtoa out of the include path for the rest of libc.
* Add support for TLS in statically linked programs.dfr2004-08-152-1/+37
|
* Fix printing of long doubles to match the size thatgallatin2004-07-192-11/+8
| | | | | | | | | | | | | gcc is using. This fixes devstat consumers (like vmstat, iostat, systat) so they don't print crazy zillion digit numbers for disk transfers and bandwidth. According to gcc, long doubles are 64-bits, rather than 128 bits like the SVR4 ABI spec wants them to be.. Note that MacOSX also treats long doubles as 64-bits, and not 128 bits, so we are in good company. Reviewed by: das Approved by: grehan
* Add signalcontext, required by KSE.grehan2004-07-192-1/+104
|
* The new program counter should go into the trapframe's srr0 andgrehan2004-07-191-1/+1
| | | | not the link register, which was lucky enough to work.
* Replace seven nominally MD implementations of frexp() that are brokendas2004-07-182-57/+1
| | | | for subnormals with one implementation that works.
* Implement the classification macros isfinite(), isinf(), isnan(), anddas2004-07-092-68/+1
| | | | | | | | | | | | | | | | | | | | | isnormal() the hard way, rather than relying on fpclassify(). This is a lose in the sense that we need a total of 12 functions, but it is necessary for binary compatibility because we have never bumped libm's major version number. In particular, isinf(), isnan(), and isnanf() were BSD libc functions before they were C99 macros, so we can't reimplement them in terms of fpclassify() without adding a dependency on libc.so.5. I have tried to arrange things so that programs that could be compiled in FreeBSD 4.X will generate the same external references when compiled in 5.X. At the same time, the new macros should remain C99-compliant. The isinf() and isnan() functions remain in libc for historical reasons; however, I have moved the functions that implement the macros isfinite() and isnormal() to libm where they belong. Moreover, half a dozen MD versions of isinf() and isnan() have been replaced with MI versions that work equally well. Prodded by: kris
OpenPOWER on IntegriCloud