summaryrefslogtreecommitdiffstats
path: root/lib/libc/alpha/gen
Commit message (Collapse)AuthorAgeFilesLines
* Remove fpsetsticky(). This was added for SysV compatibility, but duedas2005-03-152-63/+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
* Replace the ldexp() implementation in libc with a renamed copy of thedas2005-01-221-137/+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.
* When required to negate the absoulte result of a division/remainderpeadar2004-11-271-1/+1
| | | | | | | | | | | | | | operation (by subtracting the absolute result from 0), don't test for overflow. This avoids an arithmetic exception when dividing LONG_MIN by 1: This is the only case that causes overflow, and the resulting value is correct under 2's compliment arithmetic. PR: 72024 Approved by: dwmalone@ Obtained from: NetBSD MFC after: 4 days
* Fix alpha build and add __FBSDID.dfr2004-08-161-1/+4
| | | | PR: 70518
* Add support for TLS in statically linked programs.dfr2004-08-152-1/+38
|
* 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-69/+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
* Use unions to avoid violating C99 strict aliasing rules.des2004-03-165-26/+36
|
* Fix some aliasing problems.das2004-02-161-6/+14
|
* Provide sysarch(2) prototypes in the MD sysarch.h headers. While I'mnectar2004-01-092-4/+2
| | | | | | | | | | at it, use the ANSI C generic pointer type for the second argument, thus matching the documentation. Remove the now extraneous (and now conflicting) function declarations in various libc sources. Remove now unnecessary casts. Reviewed by: bde
* Add required headers and function declarations.nectar2004-01-062-0/+3
|
* - Use the magic for ___sigreturn in __sigset.jeff2003-11-141-3/+11
| | | | | | | | - In __sigreturn call sigprocmask() to restore our signal state rather than returning through sigreturn(). jmp to ___sigreturn to restore our register state following this. Requested by: pete
* Add signalcontext() which will be needed by libpthread.deischen2003-08-092-1/+104
| | | | Reviewed by: marcel
* Only allow trapframe formats instead of sigframe formats like themarcel2003-07-301-4/+4
| | | | | comment says and don't write the first 3 arguments to FRAME_TRAPARG_* as they are specific to sigframes.
* Remove these from libc; they are now system calls.deischen2003-02-181-374/+0
| | | | Prompted by: mini
* 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-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* Use __FBSDID.obrien2003-01-197-18/+11
|
* libc_r wasn't so tied to libc for 22 months.ru2002-11-181-8/+8
|
* Disconnect the userland get/set/swapcontext() functions fromdeischen2002-11-162-2/+2
| | | | | | | | | libc. I want to keep these in some version for the thread library/ies, but don't know whether to have them repo-copied to libc_r or renamed and kept in libc. Change the name of an alpha macro that was changed with the system call commit.
* Re-apply the previously backed-out commit that fixes the problem wherearchie2002-10-311-1/+1
| | | | | | | | HUGE_VAL is not properly aligned on some architectures. The previous fix now works because the two versions of 'math.h' (include/math.h and lib/msun/src/math.h) have since been merged into one. PR: bin/43544
* Revert previous commit to unbreak world until we figure out thearchie2002-09-201-1/+1
| | | | right way to do it.
* Fix a problem with the definition of HUGE_VAL causing the gcc warningarchie2002-09-191-1/+1
| | | | | | "cast increases required alignment of target type" on some platforms. Reviewed by: bde
* Remove 'register' keyword.obrien2002-03-212-3/+3
|
* Move swapcontext.c to the ${MACHINE_ARCH}/gen/Makefile.inc area, otherwisepeter2002-03-211-1/+1
| | | | | it causes undefined references to getcontext() and setcontext() on platforms other than i386 and alpha.
* Add getcontext, setcontext, makecontext, and swapcontext. Thesedeischen2002-01-104-0/+598
| | | | | | | | | functions are defined in SUSv2 and the latest POSIX spec. Thanks to Bernd Walter <ticso@cicely8.cicely.de> for helping debug my alpha assembly. Approved by: -arch
* Save and restore t12 in the jmp_buf. t12 is used during functiondeischen2001-12-222-0/+3
| | | | | | | | | calls. This change allows libc_r to create thread contexts with a different stack and return address. With much detective work by: Bernd Walter <ticso@cicely.de>
* Fix vendor ID's.obrien2001-11-0712-36/+60
|
* Remove _THREAD_SAFE and make libc thread-safe by default bydeischen2001-01-243-32/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adding (weak definitions to) stubs for some of the pthread functions. If the threads library is linked in, the real pthread functions will pulled in. Use the following convention for system calls wrapped by the threads library: __sys_foo - actual system call _foo - weak definition to __sys_foo foo - weak definition to __sys_foo Change all libc uses of system calls wrapped by the threads library from foo to _foo. In order to define the prototypes for _foo(), we introduce namespace.h and un-namespace.h (suggested by bde). All files that need to reference these system calls, should include namespace.h before any standard includes, then include un-namespace.h after the standard includes and before any local includes. <db.h> is an exception and shouldn't be included in between namespace.h and un-namespace.h namespace.h will define foo to _foo, and un-namespace.h will undefine foo. Try to eliminate some of the recursive calls to MT-safe functions in libc/stdio in preparation for adding a mutex to FILE. We have recursive mutexes, but would like to avoid using them if possible. Remove uneeded includes of <errno.h> from a few files. Add $FreeBSD$ to a few files in order to pass commitprep. Approved by: -arch
* Remove duplicate FreeBSD id tags.jhb2000-08-213-3/+0
|
* Take a shot at implementing a functional rfork_thread() for alpha. Thispeter2000-07-292-0/+66
| | | | | | was not fun and I am not entirely certain of the correctness, but it seems to work. (in fact, side by side testing of this code vs the x86 version turned up hidden bugs in the x86 code).
* Finish moving all IEEE fp types to be the same on all arch's.jhb2000-05-102-3/+3
|
* Add FreeBSD Id tags.obrien2000-05-1012-1/+13
|
* fp_except => fp_except_t for consistancy with the i386 and the traditionobrien2000-05-104-8/+12
| | | | C methoid of nameing types.
* Remove unnecessary alternate entry points for *setjmp(). Make the mainjasone2000-01-203-18/+33
| | | | | | | entry point the standard name when not compiling libc_r (for example, longjmp is the main entry point instead of __longjmp). Suggested by: bde
* Make minor entry point changes to support libc_r.jasone2000-01-193-6/+6
|
* Add three-tier symbol naming in support of POSIX thread cancellationjasone2000-01-123-12/+28
| | | | | | points. For library functions, the pattern is __sleep() <-- _libc_sleep() <-- sleep(). The arrows represent weak aliases. For system calls, the pattern is _read() <-- _libc_read() <-- read().
* In longjmp, call sigreturn instead of osigreturn. The latter isn'tjdp1999-10-141-1/+1
| | | | | | visible from userland any more. Reviewed by: luoqi
* Fix misspelling of the "addq" opcode.jdp1999-09-291-1/+1
|
* sigset_t change (part 5 of 5)marcel1999-09-291-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ----------------------------- Most of the userland changes are in libc. For both the alpha and the i386 setjmp has been changed to accomodate for the new sigset_t. Internally, libc is mostly rewritten to use the new syscalls. The exception is in compat-43/sigcompat.c The POSIX thread library has also been rewritten to use the new sigset_t. Except, that it currently only handles NSIG signals instead of the maximum _SIG_MAXSIG. This should not be a problem because current applications don't use any signals higher than NSIG. There are version bumps for the following libraries: libdialog libreadline libc libc_r libedit libftpio libss These libraries either a) have one of the modified structures visible in the interface, or b) use sigset_t internally and may cause breakage if new binaries are used against libraries that don't have the sigset_t change. This not an immediate issue, but will be as soon as applications start using the new range to its fullest. NOTE: libncurses already had an version bump and has not been given one now. NOTE: doscmd is a real casualty and has been disconnected for the moment. Reconnection will eventually happen after doscmd has been fixed. I'm aware that being the last one to touch it, I'm automaticly promoted to being maintainer. According to good taste this means that I will receive a badge which either will be glued or mechanically stapled, drilled or otherwise violently forced onto me :-) NOTE: pcvt/vttest cannot be compiled with -traditional. The change cause sys/types to be included along the way which contains the const and volatile modifiers. I don't consider this a solution, but more a workaround.
* $Id$ -> $FreeBSD$peter1999-08-282-2/+2
|
* Declare the return address for __divX, __remX so that gdb can step overdfr1999-05-021-1/+1
| | | | calls properly.
* Implement fpsetmask() and other fp*() functions. Programs should usedfr1998-12-237-27/+54
| | | | | | | | | | #include <ieeefp.h> to access these functions instead of the i386 specific #include <machine/floatingpoint.h> Submitted by: Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
* CALL -> PCALL for sigaltstack for libc_r.jb1998-12-101-1/+1
|
* Remove support for NetBSD syscalls.jb1998-08-173-29/+1
|
* Allow for the fact that NetBSD syscalls are no longer the default. Calljb1998-08-081-0/+4
| | | | sigaltstack by default if using FreeBSD syscalls.
* Make NetBSD compatibility conditional on NETBSD_SYSCALLS being defined.jb1998-08-081-1/+3
| | | | This is no longer the default.
* Rename calls when building libc_r.jb1998-06-091-3/+3
|
* Remove a big hack after adding a small one to libc/gen/getcwd.c tojb1998-05-152-232/+2
| | | | handle the lack of __getcwd syscall in NetBSD.
* Import sources from NetBSD, tweaked for building in FreeBSD.jb1998-03-0920-0/+1550
OpenPOWER on IntegriCloud