Commit Graph

88 Commits

Author SHA1 Message Date
martin
e56cdf1dd0 Sync all resumecontext.c versions with the changes originally made
by Matthias Drochner to i386 and alpha:

-check for a NULL uc_link before calling setcontext(2); do a real exit(3)
 instead with exit handlers and all that
-If setcontext(2) returns (which it shouldn't), do an _exit(-1) rather
 than relying on a sensible return value to use as exit code. Makes
 it less likely that an ucontext corruption goes unnoticed.
2006-12-08 16:09:02 +00:00
drochner
4cbc875060 build frexp_ieee754 in the "compat" subtree
(There are assembler versions of ldexp and modf which need to be checked.
I'm in doubt they are metter than those in libm.)
2006-07-03 12:58:55 +00:00
perry
ce666bb8ce __asm__ -> __asm 2005-12-24 23:10:08 +00:00
christos
e5548b402a Use reach-over sources from common/lib/libc 2005-12-20 19:31:47 +00:00
tsutsui
ff4cdaa621 Follow compat libc changes on i386:
> _setjmp and _longjmp are not compat functions. Noticed by Havard Eidnes
2005-10-07 17:16:39 +00:00
tsutsui
f80595ca7d Switch mips to the new libc compat code layout. 2005-09-17 11:49:39 +00:00
martin
b0e34b2bc9 Add missing <compat/include/setjmp.h> 2005-09-14 08:59:37 +00:00
lukem
88c3eadbfa Add missing __RCSID() 2005-06-12 05:21:25 +00:00
kleink
b2cb7fcd8a Push back the descriptions of NaN formats, and descriptions of the
distinction between signalling NaNs and quiet NaNs back into the
machine-dependent headers; treat the implementation of __nanf in the
same spirit.

IEEE 754 leaves the distinction between signalling NaNs and quiet NANs
to the implementation, and unlike our headers used to suggest they're
not identical in the interpretation of the fraction's MSb; in due
course, make those of hppa, mips, sh3, and sh5 reflect reality.
2005-04-15 22:39:10 +00:00
simonb
b52cdd0dd6 Copy the sparc/sparc64 __longjmp14() way of dealing with signal masks:
* Restore the signal mask with sigprocmask() instead of _UC_SIGMASK,
  * since libpthread may want to interpose on signal handling.

Fixes regress/lib/libpthread/siglongjmp1.
2004-07-03 05:44:55 +00:00
simonb
b4f0be566a Catch up with changes to __fpregset_t.
In __longjmp14(), copy the FP CSR from the correct array and array slot.

Completes fix for PR port-mips/25942.
2004-07-03 05:10:06 +00:00
simonb
2b5fd0669b Actually compile __longjmp14.c. 2004-03-23 12:31:52 +00:00
simonb
02082ea642 Restore the PC as well; also use mcontext register defines for accessing
the mcontext.
2004-03-23 12:31:17 +00:00
simonb
769814bf89 Use setcontext() instead of sigreturn() to implement longjmp(). 2004-03-23 02:21:49 +00:00
kleink
8e54f10bf7 * Turn isinf(3) and isnan(3) into C99-style macros.
* Make it possible for ports to override these (i.e., VAX).
* Remove isnanl(), which was internal to libc only.
2004-03-04 23:42:38 +00:00
drochner
c5bc0dada8 optimize this: we can use %ra for relocation directly
(saves 1 insn)
2004-03-01 20:43:19 +00:00
drochner
293e83e97e get the offset to gp right 2004-03-01 18:32:51 +00:00
kleink
d82e732345 Add C99 fpclassify(), isfinite(), isnormal(), and signbit() macros. 2004-01-15 19:43:44 +00:00
he
ea56bcee84 Hide the register number constants behind an _R_ prefix, and also
rename FPBASE to _FPBASE, so that we avoid polluting the user's
name space when e.g. <sys/ptrace.h> is included.  Previously, the
PC symbol in mips/regnum.h would conflict with the declaration of
the external variable by the same name in termcap.h, as discovered
by the ``okheaders'' regression test.
2003-11-26 08:36:49 +00:00
kleink
a98b4bac65 Add __infinityf and __infinityl, float respectively long double analogs
of __infinity.
2003-10-26 00:48:14 +00:00
he
6afbde6005 Correct another typo. 2003-10-25 14:51:16 +00:00
kleink
15e03bd18f Pasto in previous. 2003-10-25 14:31:21 +00:00
kleink
712c8de209 * Since there is no single portable IEEE 754 format for a long double,
keep a common implementation of isinfl() and isnanl() to be used by
  platforms where `long double' == `double'; move others into
  machine-dependent code.
* In due course, consider __VFP_FP__ on arm.
2003-10-24 00:58:01 +00:00
agc
eb7c1594f1 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22280, verified by myself.
2003-08-07 16:42:00 +00:00
lukem
a93ea220fc Rework how dependency generation is performed:
* DPSRCS contains extra dependencies, but is _NOT_ added to CLEANFILES.
  This is a change of behaviour.  If a Makefile wants the clean semantics
  it must specifically append to CLEANFILES.
  Resolves PR toolchain/5204.

* To recap: .d (depend) files are generated for all files in SRCS and DPSRCS
  that have a suffix of: .c .m .s .S .C .cc .cpp .cxx

* If YHEADER is set, automatically add the .y->.h to DPSRCS & CLEANFILES

* Ensure that ${OBJS} ${POBJS} ${LOBJS} ${SOBJS} *.d  depend upon ${DPSRCS}

* Deprecate the (short lived) DEPENDSRCS


Update the various Makefiles to these new semantics; generally either
adding to CLEANFILES (because DPSRCS doesn't do that anymore), or replacing
specific .o dependencies with DPSRCS entries.

Tested with "make -j 8 distribution" and "make distribution".
2003-08-01 17:03:41 +00:00
thorpej
8969ba6ff5 Build _isinfl() and _isnanl(). 2003-05-17 15:05:52 +00:00
kleink
db907cb577 Rename ieee754_function.c to function_ieee754.c, following the convention
used in exec_format.c, loadfile_format.c, subsys_machdep.c etc.
Per discussion with Christos.
2003-05-12 15:15:11 +00:00
kleink
3b364b9b85 Make sure we reference getcontext() by its internal name. 2003-04-07 21:04:20 +00:00
matt
bdde89628b Cast with uintptr_t instead of u_long. 2003-01-19 08:53:36 +00:00
thorpej
3fdac2b8c5 Merge the nathanw_sa branch. 2003-01-18 10:52:16 +00:00
thorpej
7f74df5ef3 ABICALLS -> __ABICALLS__ 2002-11-10 18:10:25 +00:00
thorpej
6596b29802 t4 -> ta0 2002-11-05 00:05:15 +00:00
simonb
2d8577fb83 Clean up some rampant code duplication wrt ieee number handling:
- Add alignment-safe double and float unions.
 - Use the above for the __infinity and __nan constants on all
   architectures that use the standard ieee754 representation of
   those constants.
 - Add a single copy of various ieee754 math functions (frexp, isinf,
   isnan, ldexp and modf) that had numerous duplicates among the
   arch-specific directories.
 - Use the above functions on all architectures where the generic C
   versions where used.  Architectures that had local assembly
   routines are untouched (for those functions only).
2002-02-19 13:08:12 +00:00
thorpej
5d3e829423 Add internal names for fp{get,set}{mask,round,sticky}(), and
externally-visible weak aliases for the internal names.
2002-01-13 21:45:39 +00:00
cgd
2eb1943575 make these more amenable to being copied into libkern. (Gee, why wasn't
this done before?  it's not like it was hard...)
2001-02-27 19:44:54 +00:00
cgd
181fee6ea8 pull up <machine/endian.h> and use BYTE_ORDER to decide endianness,
rather than MIPSEL and MIPSEB definitions.
2001-02-27 18:59:16 +00:00
soren
89c5a767f8 Fix doubled 'the's. 2000-03-13 22:55:05 +00:00
shin
e68fefb855 remove unused files (MIPS SOFTFLOAT). 2000-03-05 05:45:46 +00:00
shin
ac9896415f remove MIPS SOFTFLOAT. 2000-03-05 05:41:03 +00:00
mycroft
19b51e87a9 Remove pointless #ifdef. 2000-02-25 17:40:30 +00:00
mycroft
9ff0891c83 Fix bogons. 2000-02-22 03:28:04 +00:00
mycroft
5256a370bf Do the minimum work to make this compile with -Werror. 2000-02-22 03:14:20 +00:00
mycroft
c26054b799 Delint. 2000-01-22 22:40:58 +00:00
shin
509e885e3b fix name space pollution by adding prefix '_mips_'.
closes PR 8770.
1999-12-26 00:22:31 +00:00
kleink
11e6c54cfc C99: Define a NAN macro in <math.h> which evaulates to a constant expression of
a single-precision quiet NaN; only to be defined on platforms that do support
this value.
1999-12-23 10:15:05 +00:00
shin
54de12eae6 remove extra lw (SOFTFLOAT) 1999-10-11 05:25:35 +00:00
shin
f761ddb744 adjust #endif position (SOFTFLOAT) 1999-10-11 05:21:06 +00:00
takemura
cdabc2eb91 Hpcmips needs completely FPU instruction free user land.
XXX, this modification is kinda ad-hoc.
1999-09-29 13:19:13 +00:00
takemura
2f85eb6142 Import NetBSD/hpcmips source files from hpcmips repository.
file list:
        sys/arch/hpcmips/
        distrib/hpcmips/
        etc/etc.hpcmips/
        lib/libc/arch/mips/fplib/
        lib/libc/arch/mips/fplib/Makefile.inc
        lib/libc/arch/mips/fplib/environment.h
        lib/libc/arch/mips/fplib/fplib_glue.c
        lib/libc/arch/mips/fplib/fplib_libc.c
        lib/libc/arch/mips/fplib/hpcmips-gcc.h
        lib/libc/arch/mips/fplib/softfloat-macros.h
        lib/libc/arch/mips/fplib/softfloat-specialize.h
        lib/libc/arch/mips/fplib/softfloat.c
        lib/libc/arch/mips/fplib/softfloat.h
        lib/libc/arch/mips/gen/ieee.h
        lib/libc/arch/mips/gen/sf_fabs.c
        lib/libc/arch/mips/gen/sf_flt_rounds.c
        lib/libc/arch/mips/gen/sf_fpgetmask.c
        lib/libc/arch/mips/gen/sf_fpgetround.c
        lib/libc/arch/mips/gen/sf_fpgetsticky.c
        lib/libc/arch/mips/gen/sf_fpsetmask.c
        lib/libc/arch/mips/gen/sf_fpsetround.c
        lib/libc/arch/mips/gen/sf_fpsetsticky.c
        lib/libc/arch/mips/gen/sf_isinf.c
        lib/libc/arch/mips/gen/sf_ldexp.c
        lib/libc/arch/mips/gen/sf_modf.c
1999-09-16 12:13:17 +00:00
mycroft
9cba4741ee Use C versions of isinf() and isnan(). The assembler code is basically
identical, but was endian-dependent.
1999-08-29 23:01:40 +00:00