Commit Graph

235 Commits

Author SHA1 Message Date
martin 2ed5a47025 Pull over rev. 1.5 of the i386 version (../../i386/resumecontext.S),
quoting Matthias Drochner:

> -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.

This fixes regress/lib/libc/context for m68k.

Thanks to Steve Woodford for optimization hints.
2006-12-13 10:48:02 +00:00
drochner c48c54fd05 build frexp_ieee754 in the "compat" subtree
(The Makefile logics for ldexp and modf is too involved for me to deal
with this now.)
2006-07-03 12:54:34 +00:00
uwe 46daac62de G/c KMSRCS and KMINCLUDES now that we have common/lib/libc 2006-06-17 18:04:23 +00:00
christos 96473fa808 change __weak_extern to __weak_reference so that gcc4 works. 2006-05-18 17:54:19 +00:00
mrg 8726b401d3 if SOFTFLOAT_FOR_GCC is not defined, don't declare float_detect_tininess. 2006-05-16 20:55:51 +00:00
drochner f81322cf18 build erand48_ieee754.c on everything but vax 2006-03-22 22:03:58 +00:00
he dcaa7a3be5 It's .endif, not .fi. 2006-03-21 22:50:13 +00:00
kleink 4b173cfc48 Don't build extended-precision routines on m68000; from Havard. 2006-03-20 09:52:23 +00:00
kleink bc89c06cbf Add strtof(3) and strtold(3); welcome libc 12.137. 2006-03-15 17:35:17 +00:00
christos 22d2b3199c Welcome to the new compat layout. 2006-03-09 16:20:27 +00:00
christos b1732b7a63 make these consistent. 2006-02-19 05:06:02 +00:00
kleink 804e6c96a2 Add machine-dependent definitions for gdtoa. 2006-01-25 15:33:28 +00:00
perry 4e11af46bc Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 21:11:15 +00:00
christos e5548b402a Use reach-over sources from common/lib/libc 2005-12-20 19:31:47 +00:00
he f9efc4ab63 Patterned after the other fixes for __longjmp14.c, include
<compat/include/setjmp.h> also here to make these build.
2005-09-14 13:46:32 +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
jmmv 8a1eb34d66 Add support to build the mac68k port with soft-float enabled (i.e., setting
MKSOFTFLOAT=yes).  The main purpose of this feature is to let NetBSD work
in machines with the 68040LC chip (those that have the FPU bug).

All the work has been done by Bruce O'Neel <edoneel AT sdf.lonestar.org>,
with some very minor changes by me; the patches were being posted to the
port-mac68k mailing list.  It has been tested for a long time by several
users, including me.

I have just verified that regular releases, as well as soft-float ones,
continue to build.

There have been no objections to this patch since I asked for them in July
in the port-mac68k list.
2004-09-26 21:13:27 +00:00
drochner 0341f6a45e the WARN_REFERENCES text "include <signal.h> for correct reference" is pointless
as <signal.h> won't help you, so remove it
2004-03-26 22:15:03 +00:00
drochner 87d87e87fe no need to define __HAVE_SIGINFO anymore 2004-03-26 21:29:07 +00:00
drochner cd85223ee2 save errno while trying to install a !SA_SIGINFO trampoline -- this
is expected to fail with !COMPAT_16 kernels, and we shouldn't
overwrite errno in this case
2004-03-23 16:19:40 +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
kleink d82e732345 Add C99 fpclassify(), isfinite(), isnormal(), and signbit() macros. 2004-01-15 19:43:44 +00:00
martin 269c3e3d2b Use an unsigned comparison against minbrk.
From OpenBSD, changed by Miod Vallat.
2003-12-26 11:21:48 +00:00
kleink 0a97d0875b C99 7.12.3.2: add library portions of isfinite, but don't build these just
yet.
2003-10-29 20:03:51 +00:00
kleink 75327729a2 C99 7.12.3.1: add IEEE library portions of fpclassify. Don't build these
yet as the VAX implementation is still subject to discussion.
2003-10-28 22:05:37 +00:00
kleink fdb80dd054 Ignore the explicit integer bit here, too; otherwise an infinity with the
explicit integer bit set could be classified as NaN.
2003-10-28 00:13:22 +00:00
kleink 964d6747b5 Err, rename some members added in previous to make them reflect their
semantics better.
2003-10-27 01:11:46 +00:00
kleink 5976f8aa56 Retire local union { floating-type; struct ieee_prec; } in favor of those
available from <machine/ieee.h>
2003-10-27 00:05:46 +00:00
kleink be5cd162d0 Use the generic `long double' == `double' versions on m68000. 2003-10-26 10:03:11 +00:00
kleink 9f3dbee22c Add __infinityf and __infinityl, float respectively long double analogs
of __infinity.
2003-10-25 22:31:20 +00:00
cl 342cbd284f replace __longjmp14 asm-implementation with __longjmp14 C-implementation
uses setcontext instead of __sigreturn14
fixes longjmp/siglongjmp when !COMPAT_16
2003-10-25 17:13:57 +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
christos c4990e5532 Userland portion of SIGTRAMP_VALID() commit. 2003-10-18 18:16:23 +00:00
cl ae9566397a SA_SIGINFO support for m68k (libc) 2003-09-22 14:42:02 +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
salo 99410184e7 netbsd.org->NetBSD.org 2003-07-26 19:24:24 +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
nathanw 4fb740b8de Implement pthread_atfork() (in libc, because the required threadlib
stub behavior is exactly the same as the usual behavior).
2003-02-13 02:50:48 +00:00
kleink 9b24979426 Fix comment typo, and convert to C-style comments. 2003-01-26 17:58:55 +00:00
thorpej 3fdac2b8c5 Merge the nathanw_sa branch. 2003-01-18 10:52:16 +00:00
thorpej c061e6bf8b Enable the libc-provided signal trampoline. The old __sigaction14
entry point has been replaced by the new __sigaction14() which is a
wrapper around the __sigaction_sigtramp system call (which is itself
not directly exposed outside of libc).

No shared library version change is necessary; no new symbols
are exposed outside of libc.
2002-07-10 04:29:05 +00:00
thorpej 8aa4d3caec New __sigaction14() system call stub which registers the signal
trampoline, and the signal trampolines themselves.

NOTE: These are not yet enabled; they will be enabled after further
testing on more architectures.
2002-07-09 23:32:35 +00:00
thorpej d9f211b107 Make this work with an ISO C preprocessor. 2002-05-30 05:08:51 +00:00
wiz 92d8b1e9fa Revert previous: .S files are currently compiled with -traditional-cpp,
so __STDC__ is _not_ always defined.
2002-05-26 12:24:55 +00:00
wiz d56bb7c2ec __STDC__ is always defined on NetBSD. 2002-05-26 11:48:00 +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