summaryrefslogtreecommitdiff
path: root/lib/libc/powerpc
Commit message (Collapse)AuthorAgeFilesLines
* MFC r251047:Konstantin Belousov2013-06-041-0/+7
| | | | | | | Avoid a nested frame for getcontext() call in check_deferred_signal(). Notes: svn path=/stable/9/; revision=251365
* MFC r246117:Konstantin Belousov2013-02-132-0/+50
| | | | | | | | | | Rework the __vdso_* symbols attributes to only make the symbols weak, 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. Notes: svn path=/stable/9/; revision=246775
* MFC r234115:Nathan Whitehorn2012-04-213-3/+0
| | | | | | | | | | | | Do not restore the register holding the TLS pointer when doing various 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. Notes: svn path=/stable/9/; revision=234520
* MFC r230429:Konstantin Belousov2012-02-212-1/+70
| | | | | | | | | | | | | | | | Add API for obtaining extended machine context states that cannot be 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). MFC r230864: Make the sys/ucontext.h self-contained by changing the return type of __getcontextx_size(3) from size_t to int. Notes: svn path=/stable/9/; revision=231981
* 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
* Mark assembler sources from libc as working with non-executable stack.Konstantin Belousov2011-01-1412-1/+22
| | | | | | | Reviewed and tested by: nwhitehorn Notes: svn path=/head/; revision=217398
* The NetBSD Foundation has granted permission to remove clause 3 and 4 fromJoel Dahl2010-03-025-35/+0
| | | | | | | | | their software. Obtained from: NetBSD Notes: svn path=/head/; revision=204606
* Mark uname(), getdomainname() and setdomainname() with COMPAT_FREEBSD4.Ed Schouten2008-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 Notes: svn path=/head/; revision=184789
* Fix some ifdef logic in the libc syncicache() bit that I somehow missed in theNathan Whitehorn2008-09-241-1/+3
| | | | | | | last commit. Now it really can use a runtime-set cacheline size. Notes: svn path=/head/; revision=183320
* Allow the cacheline size on PowerPC to be set at runtime. This is essential forNathan Whitehorn2008-09-241-16/+16
| | | | | | | | supporting 64-bit CPUs, which often have 128-byte cache lines instead of the standard 32. Notes: svn path=/head/; revision=183319
* Add support files for compiling with soft-float. This has beenMarcel Moolenaar2008-04-273-0/+448
| | | | | | | | copied from ARM and modified to warrant the duplication. Oh, and to make it work for PowerPC :-) Notes: svn path=/head/; revision=178620
* Let PowerPC world optionally build with -msoft-float. For FPU-less PowerPCRafal Jaworowski2008-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 Notes: svn path=/head/; revision=176530
* Fix build from errors exposed with recent version_gen.awk commit.Peter Grehan2007-10-181-2/+1
| | | | | | | | Not quite sure if this is 100% correct: awaiting review. But quieten tinderbox in the meantime. Notes: svn path=/head/; revision=172740
* Classify mmap, lseek, pread, pwrite, truncate, ftruncate as pseudoPeter Wemm2007-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) Notes: svn path=/head/; revision=171218
* Fix bogon in previous commit: <machine/cpu.h> is still needed.Marcel Moolenaar2007-06-101-0/+1
| | | | Notes: svn path=/head/; revision=170506
* The definition of CACHELINESIZE moved from <machine/cpu.h> toMarcel Moolenaar2007-06-101-1/+1
| | | | | | | <machine/md_var.h>. Notes: svn path=/head/; revision=170484
* Some libc symbol map cleanups.Daniel Eischen2007-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 Notes: svn path=/head/; revision=170154
* I guess powerpc needs vfork(), add it to the symbol list.Daniel Eischen2007-05-141-0/+1
| | | | | | | Submitted by: marius Notes: svn path=/head/; revision=169548
* Remove .mcount from gmon's Symbol map and add it to the appropriateDaniel Eischen2007-05-131-0/+1
| | | | | | | | | | arch. It can be named differently depending on the arch (.mcount, _mcount). Submitted by: marius Notes: svn path=/head/; revision=169525
* Use C comments since we now preprocess these files with CPP.Daniel Eischen2007-04-291-9/+11
| | | | Notes: svn path=/head/; revision=169092
* The distinction between quiet and signaling NaN formats isDavid Schultz2007-01-031-0/+21
| | | | | | | | machine-dependent; these files tell the latest version of gdtoa what to do. Notes: svn path=/head/; revision=165747
* Instead of re-implementing hton[ls] and friends for each arch, add a new MIOlivier Houchard2006-11-065-158/+0
| | | | | | | | | | file, net/ntoh.c, which just implement them using the inline functions from <sys/endian.h>. Suggested by: bde Notes: svn path=/head/; revision=164053
* Whitespace fix.Marcel Moolenaar2006-09-021-1/+1
| | | | Notes: svn path=/head/; revision=161853
* Avoid dead code elimination of the assignment to TP by using inlineMarcel Moolenaar2006-08-301-2/+2
| | | | | | | assembly. Notes: svn path=/head/; revision=161729
* Add each directory's symbol map file to SYM_MAPS.Daniel Eischen2006-03-131-1/+1
| | | | Notes: svn path=/head/; revision=156613
* Add symbol maps and initial symbol version definitions to libc.Daniel Eischen2006-03-131-0/+60
| | | | | | | Reviewed by: davidxu Notes: svn path=/head/; revision=156608
* Remove fpsetsticky(). This was added for SysV compatibility, but dueDavid Schultz2005-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 Notes: svn path=/head/; revision=143658
* Define LDBL_NBIT to be a mask indicating the position of the integerDavid Schultz2005-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. Notes: svn path=/head/; revision=143214
* Update my email address.David Schultz2005-02-061-1/+1
| | | | Notes: svn path=/head/; revision=141379
* Replace the ldexp() implementation in libc with a renamed copy of theDavid Schultz2005-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. Notes: svn path=/head/; revision=140607
* Add a file missed in the previous commit:David Schultz2005-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. Notes: svn path=/head/; revision=140280
* Eliminate gdtoa.mk and move its contents to ${MACHINE_ARCH}/Makefile.inc.David Schultz2005-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. Notes: svn path=/head/; revision=140279
* Add support for TLS in statically linked programs.Doug Rabson2004-08-152-1/+37
| | | | Notes: svn path=/head/; revision=133754
* Fix printing of long doubles to match the size thatAndrew Gallatin2004-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 Notes: svn path=/head/; revision=132421
* Add signalcontext, required by KSE.Peter Grehan2004-07-192-1/+104
| | | | Notes: svn path=/head/; revision=132399
* The new program counter should go into the trapframe's srr0 andPeter Grehan2004-07-191-1/+1
| | | | | | | not the link register, which was lucky enough to work. Notes: svn path=/head/; revision=132398
* Replace seven nominally MD implementations of frexp() that are brokenDavid Schultz2004-07-182-57/+1
| | | | | | | for subnormals with one implementation that works. Notes: svn path=/head/; revision=132366
* Implement the classification macros isfinite(), isinf(), isnan(), andDavid Schultz2004-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 Notes: svn path=/head/; revision=131852
* makecontext lib call.Peter Grehan2004-03-023-3/+167
| | | | | | | Submitted by: Suleiman Souhlal <refugee@segfaulted.com> Notes: svn path=/head/; revision=126475
* Fix some aliasing problems.David Schultz2004-02-161-6/+14
| | | | Notes: svn path=/head/; revision=125865
* Add forgotten IEEE functions. The Perl 5.8 port now compiles.Peter Grehan2004-02-129-2/+428
| | | | | | | | Submitted by: Suleiman Souhlal <refugee@segfaulted.com> Obtained from: NetBSD Notes: svn path=/head/; revision=125733
* Include <stdlib.h> to get abort() prototype.Peter Grehan2004-01-211-0/+2
| | | | Notes: svn path=/head/; revision=124769
* Define LDBL_MANH_SIZE and LDBL_MANL_SIZE to be the sizes of theDavid Schultz2004-01-181-0/+3
| | | | | | | high and low words of the mantissa in bits, respectively. Notes: svn path=/head/; revision=124653
* - Put manh/manl bitfields into correct-sized integral type.Peter Grehan2003-12-101-5/+4
| | | | | | | - remove XXX normalization bit comment, code is correct. Notes: svn path=/head/; revision=123381
* Add the mlockall() and munlockall() system calls.Bruce M Simpson2003-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | - All those diffs to syscalls.master for each architecture *are* necessary. This needed clarification; the stub code generation for mlockall() was disabled, which would prevent applications from linking to this API (suggested by mux) - Giant has been quoshed. It is no longer held by the code, as the required locking has been pushed down within vm_map.c. - Callers must specify VM_MAP_WIRE_HOLESOK or VM_MAP_WIRE_NOHOLES to express their intention explicitly. - Inspected at the vmstat, top and vm pager sysctl stats level. Paging-in activity is occurring correctly, using a test harness. - The RES size for a process may appear to be greater than its SIZE. This is believed to be due to mappings of the same shared library page being wired twice. Further exploration is needed. - Believed to back out of allocations and locks correctly (tested with WITNESS, MUTEX_PROFILING, INVARIANTS and DIAGNOSTIC). PR: kern/43426, standards/54223 Reviewed by: jake, alc Approved by: jake (mentor) MFC after: 2 weeks Notes: svn path=/head/; revision=118771
* Add a comment describing why it's important for the values in thisDavid Schultz2003-05-081-0/+7
| | | | | | | | | file to be correct, and how to generate them automatically. Caused much pain and suffering for: peter Notes: svn path=/head/; revision=114839
* Add __ldtoa(), a wrapper around gdtoa() to make it look like dtoa().David Schultz2003-04-051-0/+8
| | | | | | | | | | In support of this, add some MD macros to assist in converting long doubles to the format expected by gdtoa(). Reviewed by: silence on standards@ Notes: svn path=/head/; revision=113145
* Replace our ancient dtoa/strtod implementation with the gdtoaDavid Schultz2003-03-122-0/+14
| | | | | | | | | | | | | | | | | | | | | package, a more recent, generalized set of routines. Among the changes: - Declare strtof() and strtold() in stdlib.h. - Add glue to libc to support these routines for all kinds of ``long double''. - Update printf() to reflect the fact that dtoa works slightly differently now. As soon as I see that nothing has blown up, I will kill src/lib/libc/stdlib/strtod.c. Soon printf() will be able to use the new routines to output long doubles without loss of precision, but numerous bugs in the existing code must be addressed first. Reviewed by: bde (briefly), mike (mentor), obrien Notes: svn path=/head/; revision=112163
* o Implement C99 classification macros isfinite(), isinf(), isnan(),Mike Barcroft2003-02-121-0/+5
| | | | | | | | | | | | isnormal(). The current isinf() and isnan() are perserved for binary compatibility with 5.0, but new programs will use the macros. o Implement C99 comparison macros isgreater(), isgreaterequal(), isless(), islessequal(), islessgreater(), isunordered(). Submitted by: David Schultz <dschultz@uclink.Berkeley.EDU> Notes: svn path=/head/; revision=110769
* Implement fpclassify():Mike Barcroft2003-02-082-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Add a MD header private to libc called _fpmath.h; this header contains bitfield layouts of MD floating-point types. o Add a MI header private to libc called fpmath.h; this header contains bitfield layouts of MI floating-point types. o Add private libc variables to lib/libc/$arch/gen/infinity.c for storing NaN values. o Add __double_t and __float_t to <machine/_types.h>, and provide double_t and float_t typedefs in <math.h>. o Add some C99 manifest constants (FP_ILOGB0, FP_ILOGBNAN, HUGE_VALF, HUGE_VALL, INFINITY, NAN, and return values for fpclassify()) to <math.h> and others (FLT_EVAL_METHOD, DECIMAL_DIG) to <float.h> via <machine/float.h>. o Add C99 macro fpclassify() which calls __fpclassify{d,f,l}() based on the size of its argument. __fpclassifyl() is never called on alpha because (sizeof(long double) == sizeof(double)), which is good since __fpclassifyl() can't deal with such a small `long double'. This was developed by David Schultz and myself with input from bde and fenner. PR: 23103 Submitted by: David Schultz <dschultz@uclink.Berkeley.EDU> (significant portions) Reviewed by: bde, fenner (earlier versions) Notes: svn path=/head/; revision=110566