aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/alpha/gen
Commit message (Collapse)AuthorAgeFilesLines
* Remove alpha left-overs.Ruslan Ermilov2006-08-2219-1513/+0
| | | | Notes: svn path=/head/; revision=161526
* Remove fpsetsticky(). This was added for SysV compatibility, but dueDavid Schultz2005-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 Notes: svn path=/head/; revision=143658
* Replace the ldexp() implementation in libc with a renamed copy of theDavid Schultz2005-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. Notes: svn path=/head/; revision=140607
* When required to negate the absoulte result of a division/remainderPeter Edwards2004-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 Notes: svn path=/head/; revision=138139
* Fix alpha build and add __FBSDID.Doug Rabson2004-08-161-1/+4
| | | | | | | PR: 70518 Notes: svn path=/head/; revision=133821
* Add support for TLS in statically linked programs.Doug Rabson2004-08-152-1/+38
| | | | Notes: svn path=/head/; revision=133754
* 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-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 Notes: svn path=/head/; revision=131852
* Use unions to avoid violating C99 strict aliasing rules.Dag-Erling Smørgrav2004-03-165-26/+36
| | | | Notes: svn path=/head/; revision=127091
* Fix some aliasing problems.David Schultz2004-02-161-6/+14
| | | | Notes: svn path=/head/; revision=125865
* Provide sysarch(2) prototypes in the MD sysarch.h headers. While I'mJacques Vidrine2004-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 Notes: svn path=/head/; revision=124296
* Add required headers and function declarations.Jacques Vidrine2004-01-062-0/+3
| | | | Notes: svn path=/head/; revision=124190
* - Use the magic for ___sigreturn in __sigset.Jeff Roberson2003-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 Notes: svn path=/head/; revision=122633
* Add signalcontext() which will be needed by libpthread.Daniel Eischen2003-08-092-1/+104
| | | | | | | Reviewed by: marcel Notes: svn path=/head/; revision=118687
* Only allow trapframe formats instead of sigframe formats like theMarcel Moolenaar2003-07-301-4/+4
| | | | | | | | comment says and don't write the first 3 arguments to FRAME_TRAPARG_* as they are specific to sigframes. Notes: svn path=/head/; revision=118192
* Remove these from libc; they are now system calls.Daniel Eischen2003-02-181-374/+0
| | | | | | | Prompted by: mini Notes: svn path=/head/; revision=111080
* 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-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) Notes: svn path=/head/; revision=110566
* Use __FBSDID.David E. O'Brien2003-01-197-18/+11
| | | | Notes: svn path=/head/; revision=109501
* libc_r wasn't so tied to libc for 22 months.Ruslan Ermilov2002-11-181-8/+8
| | | | Notes: svn path=/head/; revision=107052
* Disconnect the userland get/set/swapcontext() functions fromDaniel Eischen2002-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. Notes: svn path=/head/; revision=106980
* Re-apply the previously backed-out commit that fixes the problem whereArchie Cobbs2002-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 Notes: svn path=/head/; revision=106268
* Revert previous commit to unbreak world until we figure out theArchie Cobbs2002-09-201-1/+1
| | | | | | | right way to do it. Notes: svn path=/head/; revision=103686
* Fix a problem with the definition of HUGE_VAL causing the gcc warningArchie Cobbs2002-09-191-1/+1
| | | | | | | | | "cast increases required alignment of target type" on some platforms. Reviewed by: bde Notes: svn path=/head/; revision=103653
* Remove 'register' keyword.David E. O'Brien2002-03-212-3/+3
| | | | Notes: svn path=/head/; revision=92889
* Move swapcontext.c to the ${MACHINE_ARCH}/gen/Makefile.inc area, otherwisePeter Wemm2002-03-211-1/+1
| | | | | | | | it causes undefined references to getcontext() and setcontext() on platforms other than i386 and alpha. Notes: svn path=/head/; revision=92862
* Add getcontext, setcontext, makecontext, and swapcontext. TheseDaniel Eischen2002-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 Notes: svn path=/head/; revision=89177
* Save and restore t12 in the jmp_buf. t12 is used during functionDaniel Eischen2001-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> Notes: svn path=/head/; revision=88400
* Fix vendor ID's.David E. O'Brien2001-11-0712-36/+60
| | | | Notes: svn path=/head/; revision=86175
* Remove _THREAD_SAFE and make libc thread-safe by default byDaniel Eischen2001-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 Notes: svn path=/head/; revision=71579
* Remove duplicate FreeBSD id tags.John Baldwin2000-08-213-3/+0
| | | | Notes: svn path=/head/; revision=64896
* Take a shot at implementing a functional rfork_thread() for alpha. ThisPeter Wemm2000-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). Notes: svn path=/head/; revision=64004
* Finish moving all IEEE fp types to be the same on all arch's.John Baldwin2000-05-102-3/+3
| | | | Notes: svn path=/head/; revision=60338
* Add FreeBSD Id tags.David E. O'Brien2000-05-1012-1/+13
| | | | Notes: svn path=/head/; revision=60336
* fp_except => fp_except_t for consistancy with the i386 and the traditionDavid E. O'Brien2000-05-104-8/+12
| | | | | | | C methoid of nameing types. Notes: svn path=/head/; revision=60335
* Remove unnecessary alternate entry points for *setjmp(). Make the mainJason Evans2000-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 Notes: svn path=/head/; revision=56345
* Make minor entry point changes to support libc_r.Jason Evans2000-01-193-6/+6
| | | | Notes: svn path=/head/; revision=56276
* Add three-tier symbol naming in support of POSIX thread cancellationJason Evans2000-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(). Notes: svn path=/head/; revision=55837
* In longjmp, call sigreturn instead of osigreturn. The latter isn'tJohn Polstra1999-10-141-1/+1
| | | | | | | | | visible from userland any more. Reviewed by: luoqi Notes: svn path=/head/; revision=52224
* Fix misspelling of the "addq" opcode.John Polstra1999-09-291-1/+1
| | | | Notes: svn path=/head/; revision=51802
* sigset_t change (part 5 of 5)Marcel Moolenaar1999-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. Notes: svn path=/head/; revision=51794
* $Id$ -> $FreeBSD$Peter Wemm1999-08-282-2/+2
| | | | Notes: svn path=/head/; revision=50476
* Declare the return address for __divX, __remX so that gdb can step overDoug Rabson1999-05-021-1/+1
| | | | | | | calls properly. Notes: svn path=/head/; revision=46294
* Implement fpsetmask() and other fp*() functions. Programs should useDoug Rabson1998-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> Notes: svn path=/head/; revision=42029
* CALL -> PCALL for sigaltstack for libc_r.John Birrell1998-12-101-1/+1
| | | | Notes: svn path=/head/; revision=41661
* Remove support for NetBSD syscalls.John Birrell1998-08-173-29/+1
| | | | Notes: svn path=/head/; revision=38376
* Allow for the fact that NetBSD syscalls are no longer the default. CallJohn Birrell1998-08-081-0/+4
| | | | | | | sigaltstack by default if using FreeBSD syscalls. Notes: svn path=/head/; revision=38180
* Make NetBSD compatibility conditional on NETBSD_SYSCALLS being defined.John Birrell1998-08-081-1/+3
| | | | | | | This is no longer the default. Notes: svn path=/head/; revision=38179
* Rename calls when building libc_r.John Birrell1998-06-091-3/+3
| | | | Notes: svn path=/head/; revision=36824
* Remove a big hack after adding a small one to libc/gen/getcwd.c toJohn Birrell1998-05-152-232/+2
| | | | | | | handle the lack of __getcwd syscall in NetBSD. Notes: svn path=/head/; revision=36061