summaryrefslogtreecommitdiffstats
path: root/lib/libc/powerpc
Commit message (Collapse)AuthorAgeFilesLines
* 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
* makecontext lib call.grehan2004-03-023-3/+167
| | | | Submitted by: Suleiman Souhlal <refugee@segfaulted.com>
* Fix some aliasing problems.das2004-02-161-6/+14
|
* Add forgotten IEEE functions. The Perl 5.8 port now compiles.grehan2004-02-129-2/+428
| | | | | Submitted by: Suleiman Souhlal <refugee@segfaulted.com> Obtained from: NetBSD
* Include <stdlib.h> to get abort() prototype.grehan2004-01-211-0/+2
|
* Define LDBL_MANH_SIZE and LDBL_MANL_SIZE to be the sizes of thedas2004-01-181-0/+3
| | | | high and low words of the mantissa in bits, respectively.
* - Put manh/manl bitfields into correct-sized integral type.grehan2003-12-101-5/+4
| | | | - remove XXX normalization bit comment, code is correct.
* Add the mlockall() and munlockall() system calls.bms2003-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
* Add a comment describing why it's important for the values in thisdas2003-05-081-0/+7
| | | | | | file to be correct, and how to generate them automatically. Caused much pain and suffering for: peter
* Add __ldtoa(), a wrapper around gdtoa() to make it look like dtoa().das2003-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@
* Replace our ancient dtoa/strtod implementation with the gdtoadas2003-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
* o Implement C99 classification macros isfinite(), isinf(), isnan(),mike2003-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>
* Implement fpclassify():mike2003-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)
* We don't need our own personal definition of __CONCAT.obrien2003-01-181-4/+1
|
* Minimal libc for PowerPC.grehan2002-12-0418-0/+1149
| | | | | | Reviewed by: benno Approved by: re (blanket)
* _C_LABEL -> CNAMEbenno2002-05-171-14/+14
| | | | Forgotten by: benno
* Flesh this out, based on the NetBSD version.benno2002-05-171-10/+41
| | | | Reviewed by: obrien
* Grow RSYSCALL.obrien2002-05-151-0/+4
|
* Blah, fix stupid syntax error.obrien2002-05-151-1/+1
| | | | (where's the hat?)
* host-network order conversion routines.obrien2002-05-155-0/+158
| | | | Luckily we are network order, so there is little to be done. :-)
OpenPOWER on IntegriCloud