Home | History | Annotate | only in /src/lib/libc/arch/i386
History log of /src/lib/libc/arch/i386
RevisionDateAuthorComments
 1.2 24-Apr-1997  thorpej Garbage-collect unneeded file.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.23 31-Oct-2021  thorpej Tidy up how __sigaction14_sigtramp.c is added to SRCS.
 1.22 12-Oct-2020  kamil Decorate the i386 signal trampoline with CFI attributes easing unwinding

Now, the unwinders (in backtrace(3) and similar) can unwind properly
the stack from a signal handler.
 1.21 15-Jul-2015  pooka Don't include sigtramp or foocontext routines in rumprun mode. They won't
work (since a rump kernel does not provide NetBSD _lwp syscalls nor
signals), but they cause unwanted symbols to be pulled in when the
resulting libc is linked.

problem reported by Robert Gifford on rumpkernel-users
 1.20 17-Jun-2006  uwe G/c KMSRCS and KMINCLUDES now that we have common/lib/libc
 1.19 13-Sep-2005  christos compat core reorg.
 1.18 06-Sep-2003  christos Add __sigtramp2.S
 1.17 10-Jul-2002  thorpej 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.
 1.16 13-Dec-2000  matt branches: 1.16.2;
Add __syscall.S to arch/i386/gen/Makefile.inc along with all the other
sys .S files. Remove from arch/i386/Makefile.inc since it doesn't belong
there.
 1.15 13-Dec-2000  enami KMSRCS is different from SRCS. Put __syscall.S in latter.
 1.14 12-Dec-2000  simonb Move __syscall.S to the arch specific Makefile.inc's where it is
implemented.
 1.13 10-Sep-1999  drochner SYS.h was nuked from libkern
 1.12 15-Jan-1999  bouyer Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
 1.11 04-Aug-1998  perry add memcmp.S to libkern.
 1.10 04-Aug-1998  perry add memmove.S to libkern.
 1.9 22-Feb-1998  mycroft And rindex.S...
 1.8 22-Feb-1998  mycroft And index.S...
 1.7 22-Feb-1998  mycroft Copy strchr.S and strrchr.S as well.
 1.6 22-Feb-1998  mycroft Copy more files to libkern.
 1.5 09-Oct-1997  lukem rcsid police
 1.4 25-Apr-1997  thorpej DEFS.h is gone from here, don't copy it up to libkern. (It will be gone
from libkern soon, as well)
 1.3 04-Dec-1993  cgd update for .S and MACHINE_ARCH
 1.2 05-Nov-1993  cgd copy SYS.h and DEFS.h, too.
 1.1 15-Oct-1993  jtc Makefile.inc, basically a place to put KMSRC definition
 1.16.2.1 01-Aug-2002  nathanw Catch up to -current.
 1.25 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.24 12-Sep-2013  joerg branches: 1.24.2;
Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
 1.23 28-Apr-2008  martin branches: 1.23.4; 1.23.8; 1.23.28;
Remove clause 3 and 4 from TNF licenses
 1.22 23-Nov-2007  dsl branches: 1.22.6;
Reorder the code for i386 and amd64 syscall stubs so that the 'jc' on error
is a forwards jump instead of a backwards jump that a P4 will mispredect (and
probably immediatly get a cache-line miss due to the way the code gets
aligned).
 1.21 09-Mar-2007  ad branches: 1.21.4;
If I686_LIBC is defined, make syscalls using the 'sysenter' instruction.
 1.20 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.19 26-May-2002  wiz Revert previous: .S files are currently compiled with -traditional-cpp,
so __STDC__ is _not_ always defined.
 1.18 26-May-2002  wiz __STDC__ is always defined on NetBSD.
 1.17 20-Mar-2002  ross use canonical indirect jmp & call syntax to squelch new as(1) warning
 1.16 14-Jan-2002  thorpej * Add WSYSCALL() to SYS.h, which creates a system call with an
internal name and a weak alias for the name.
* Add a WEAKASM syscall list, and process it.
* Make sysarch() have an internal name (_sysarch()).
 1.15 19-Feb-2000  mycroft branches: 1.15.6;
A better fix for the stub-in-other-module problem:
Load the address of cerror through the GOT, so we can do a PIC_EPILOGUE and
leave the stack clean.
 1.14 23-Aug-1999  kleink Use _ALIGN_TEXT from <machine/asm.h>.
 1.13 07-Feb-1999  christos branches: 1.13.2;
Add PIC_PROLOGUE before the PLT call to cerror. ELF dynamic linking needs
this.
 1.12 14-Jan-1999  kleink * On architectures using ELF, and conditionally on those in transition, rename
_ASM_LABEL(cerror) and _ASM_LABEL(curbrk) to _C_LABEL(__cerror) and
_C_LABEL(__curbrk) (or their respective architecture-specific equivalents) to
avoid possible name clashes with identifiers used in user applications.
* Do the same for minbrk on all architectures to avoid a GCC-specific (and
on ELF architectures effectively useless) symbol reference renaming in MI code.
 1.11 02-May-1997  kleink Consistency: distinguish between PSEUDO() and PSEUDO_NOERROR().
 1.10 17-Oct-1996  jtc Added new macros:
SYSTRAP(x): Expands to the code used to call syscall x.
This is used to simplify other macros.

SYSCALL_NOERROR(x): Like SYSCALL except that "x" is a syscall
that can never fail.

RSYSCALL_NOERROR(x): Like RSYSCALL except that "x" is a syscall
that can never fail.
 1.9 28-Dec-1995  jtc Removed unused CALL macro
 1.8 28-Dec-1995  jtc Added macros definitions for use with ANSI preprocessors.
 1.7 26-Oct-1994  mycroft Use trap gate to enter kernel.
 1.6 31-Mar-1994  mycroft Add a .text and .align to SYSCALL().
 1.5 27-Jan-1994  mycroft One last tweak.
 1.4 27-Jan-1994  mycroft Stylistic changes.
 1.3 07-Jan-1994  pk PIC_*() macros moved to <machine/asm.h>
 1.2 06-Dec-1993  pk Use PIC_PLT() macro for error returns
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.13.2.1 22-Feb-2000  he Pull up revisions 1.14-1.15 (requested by mycroft):
Implement a better fix for the ``stubs in other shlibs'' problem.
With this fix the stack is left clean during the transition from
the stub to cerror().
 1.15.6.3 21-Jun-2002  nathanw Catch up to -current.
 1.15.6.2 22-Mar-2002  nathanw Catch up to -current.
 1.15.6.1 28-Jan-2002  nathanw Catch up to -current.
 1.21.4.1 09-Jan-2008  matt sync with HEAD
 1.22.6.1 18-May-2008  yamt sync with head.
 1.23.28.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.23.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.23.8.1 28-Apr-2008  martin file SYS.h was added on branch christos-time_t on 2008-04-28 20:22:57 +0000
 1.23.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.24.2.1 10-Aug-2014  tls Rebase.
 1.2 12-Oct-2020  kamil Fix typo
 1.1 12-Oct-2020  kamil Decorate the i386 signal trampoline with CFI attributes easing unwinding

Now, the unwinders (in backtrace(3) and similar) can unwind properly
the stack from a signal handler.
 1.1 15-Mar-2006  kleink Add strtof(3) and strtold(3); welcome libc 12.137.
 1.1 25-Jan-2006  kleink Add machine-dependent definitions for gdtoa.
 1.2 05-Jun-2011  christos Revert previous and make frach be 0xc0000000 for NAN's generated by strtold()
as suggested by tron.
 1.1 25-Jan-2006  kleink branches: 1.1.42;
Add machine-dependent definitions for gdtoa.
 1.1.42.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.30 26-Apr-2019  maya Unify signbitl implementations.
(Unclear why they were different, it was only the comments that
differed)

Add a comment describing why the generic version works for both 80-bit
and 128-bit double.
 1.29 15-Jul-2015  pooka branches: 1.29.16;
Don't include sigtramp or foocontext routines in rumprun mode. They won't
work (since a rump kernel does not provide NetBSD _lwp syscalls nor
signals), but they cause unwanted symbols to be pulled in when the
resulting libc is linked.

problem reported by Robert Gifford on rumpkernel-users
 1.28 15-Jul-2015  pooka Remove "objects built from C sources" comments. Everyone can see
they're built from C sources because the source files end in .c (???)
 1.27 26-Mar-2011  christos add fpgetprec/fpsetprec
 1.26 06-Dec-2009  uebayasi Rename ${SRCS.{alpha,arm,...}.gen} to ${LSRCS.{alpha,arm,...}.gen} because
they ended up in ${LSRCS}, not ${SRCS}. ${SRCS.*} namespace will be used
for more useful things. No functional changes intended.
 1.25 27-Jun-2006  drochner Build just the compatibility versions of frexp()/ldexp()/modf(), the
real implementation is in libm.
 1.24 06-Oct-2005  dogcow restore missing .S sources that disappeared in the last commit.
 1.23 05-Oct-2005  christos _setjmp and _longjmp are not compat functions. Noticed by Havard Eidnes
 1.22 13-Sep-2005  christos compat core reorg.
 1.21 15-Apr-2005  kleink 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.
 1.20 04-Mar-2004  kleink branches: 1.20.6;
* 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.
 1.19 15-Jan-2004  kleink Add C99 fpclassify(), isfinite(), isnormal(), and signbit() macros.
 1.18 25-Oct-2003  kleink Add __infinityf and __infinityl, float respectively long double analogs
of __infinity.
 1.17 24-Oct-2003  kleink * 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.
 1.16 01-Aug-2003  lukem 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".
 1.15 17-May-2003  thorpej Build _isinfl() and _isnanl().
 1.14 12-May-2003  kleink 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.
 1.13 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.12 19-Feb-2002  simonb 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).
 1.11 13-Dec-2000  matt branches: 1.11.2;
Add __syscall.S back to sys/Makefile.inc. Remove from arch/i386/gen/
Makefile.inc. If your architecture doesn't have __syscall.S, *add it*.
 1.10 13-Dec-2000  matt Add __syscall.S to arch/i386/gen/Makefile.inc along with all the other
sys .S files. Remove from arch/i386/Makefile.inc since it doesn't belong
there.
 1.9 23-Dec-1999  kleink 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.
 1.8 29-Aug-1999  mycroft Separate isnan() into a separate module, and make isinf()/isnan() use ieee.h.
 1.7 15-Jan-1999  bouyer Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
 1.6 26-Sep-1998  christos Add setjmp versioned bits (from Jason).
XXX: Someone needs to make setjmp/longjmp save and restore the signal stack!
 1.5 05-Nov-1997  cgd lint stubs for assembly routines.
 1.4 09-Apr-1995  mycroft branches: 1.4.10;
Add fpset{mask,round,sticky}().
 1.3 07-Apr-1995  jtc Added flt_rounds, fpget{round,mask,sticky}.
 1.2 25-Feb-1995  cgd don't forget inifinity.c
 1.1 25-Feb-1995  cgd need these for new gen/Makefile
 1.4.10.1 08-Nov-1997  veego pull up changes from the trunk (approved by perry) from cgd:
>lint stubs for assembly routines.
 1.11.2.4 22-Mar-2002  nathanw Catch up to -current.
 1.11.2.3 08-Mar-2002  nathanw Catch up to -current.
 1.11.2.2 13-Jul-2001  nathanw Make userlevel-only *context functions part of libpthread rather than libc.
 1.11.2.1 05-Mar-2001  nathanw User-level support for LWPs and scheduler activations.
SVR4-style ucontext code by Klaus Klein.
 1.20.6.1 19-Apr-2005  tron Pull up revision 1.21 (requested by kleink in ticket #163):
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.
 1.29.16.1 10-Jun-2019  christos Sync with HEAD
 1.5 13-Sep-2005  christos compat core reorg.
 1.4 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.3 13-Feb-1999  christos For don't mess up the stack before calling syscall when using PIC_PROLOGUE.
 1.2 08-Feb-1999  christos Amend for the PLT fixes, things broke last night with the changes to SYS.h
and cerror.S. In particular, the syscalls in the files committed below were
broken.
 1.1 26-Sep-1998  christos Add setjmp versioned bits (from Jason).
XXX: Someone needs to make setjmp/longjmp save and restore the signal stack!
 1.6 13-Sep-2005  christos compat core reorg.
 1.5 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.4 22-Feb-1999  christos Don't use 1: label; it is uses by the PIC_PROLOGUE macro and we jmp in the
wrong place!
 1.3 13-Feb-1999  christos For don't mess up the stack before calling syscall when using PIC_PROLOGUE.
 1.2 08-Feb-1999  christos Amend for the PLT fixes, things broke last night with the changes to SYS.h
and cerror.S. In particular, the syscalls in the files committed below were
broken.
 1.1 26-Sep-1998  christos Add setjmp versioned bits (from Jason).
XXX: Someone needs to make setjmp/longjmp save and restore the signal stack!
 1.1 05-Mar-2001  nathanw branches: 1.1.2;
file _context_u.S was initially added on branch nathanw_sa.
 1.1.2.2 13-Jul-2001  nathanw Make userlevel-only *context functions part of libpthread rather than libc.
 1.1.2.1 05-Mar-2001  nathanw User-level support for LWPs and scheduler activations.
SVR4-style ucontext code by Klaus Klein.
 1.9 02-Apr-2023  skrll Trailing whitespace
 1.8 31-Aug-2012  drochner Align the stack to a 16-byte boundary on LWP creation.
This is more than required by the ABI, but it makes programs using SSE
in a thread work without extra compiler flags or performance hit.
 1.7 24-Feb-2011  joerg branches: 1.7.4;
Allow storing and receiving the LWP private pointer via ucontext_t
on all platforms except VAX and IA64. Add fast access via register for
AMD64, i386 and SH3 ports. Use this fast access in libpthread to replace
the stack based pthread_self(). Implement skeleton support for Alpha,
HPPA, PowerPC, SPARC and SPARC64, but leave it disabled.

Ports that support this feature provide __HAVE____LWP_GETPRIVATE_FAST in
machine/types.h and a corresponding __lwp_getprivate_fast in
machine/mcontext.h.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.
 1.6 28-Apr-2008  martin branches: 1.6.8; 1.6.20;
Remove clause 3 and 4 from TNF licenses
 1.5 12-Jun-2005  lukem branches: 1.5.18;
Add missing __RCSID()
 1.4 30-May-2003  kleink Delint a use of uintptr_t; not strictly necessary with -current lint(1),
but consistent with makecontext.c.
 1.3 07-Apr-2003  kleink Make sure we reference getcontext() by its internal name.
 1.2 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.1 05-Mar-2001  nathanw branches: 1.1.2;
file _lwp.c was initially added on branch nathanw_sa.
 1.1.2.3 16-Jan-2003  thorpej Add missing notice.
 1.1.2.2 18-Dec-2001  nathanw Delint (Thanks to Havard for kicking my butt into doing this).
 1.1.2.1 05-Mar-2001  nathanw User-level support for LWPs and scheduler activations.
SVR4-style ucontext code by Klaus Klein.
 1.5.18.1 18-May-2008  yamt sync with head.
 1.6.20.1 05-Mar-2011  bouyer Sync with HEAD
 1.6.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.6.8.1 28-Apr-2008  martin file _lwp.c was added on branch christos-time_t on 2008-04-28 20:22:57 +0000
 1.7.4.1 30-Oct-2012  yamt sync with head
 1.9 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.8 05-Oct-2005  christos branches: 1.8.50; 1.8.62;
_setjmp and _longjmp are not compat functions. Noticed by Havard Eidnes
 1.7 15-Sep-2005  christos This is not used anymore; pointed out by uwe.
 1.6 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.5 16-Jul-1997  christos RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in
<machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS
define not LIBC_SCCS
 1.4 28-Dec-1995  jtc Use <machine/asm.h> instead of DEFS.h
 1.3 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.2 20-Oct-1993  jtc Replaced instructions with immediate operands with compatible alternatives
saving a few bytes while the cycle count remains the same --- could
actually be faster, depending on the cache, prefetch queue, etc.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.8.62.1 10-Aug-2014  tls Rebase.
 1.8.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4 04-Dec-1993  mycroft Clean up deleted files.
 1.3 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.2 20-Oct-1993  jtc Replaced instructions with immediate operands with compatible alternatives
saving a few bytes while the cycle count remains the same --- could
actually be faster, depending on the cache, prefetch queue, etc.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.9 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.8 07-Aug-2003  agc branches: 1.8.62; 1.8.74;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.7 23-Mar-2002  ross Fix minor syntax warnings.
 1.6 28-Jun-2001  atatat fix a grammatical error error
 1.5 16-Jul-1997  christos branches: 1.5.14;
RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in
<machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS
define not LIBC_SCCS
 1.4 28-Dec-1995  jtc Use <machine/asm.h> instead of DEFS.h
 1.3 27-Jan-1994  mycroft Pedanticism.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.5.14.2 25-Apr-2002  nathanw Catch up to -current.
 1.5.14.1 08-Oct-2001  nathanw Catch up to -current.
 1.8.74.1 10-Aug-2014  tls Rebase.
 1.8.62.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3 04-Dec-1993  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.4 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 1.3 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.2 14-Dec-2000  mycroft Adjust to not use ALTENTRY().
 1.1 15-Jan-1999  bouyer Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
 1.4 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 1.3 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.2 14-Dec-2000  mycroft Adjust to not use ALTENTRY().
 1.1 15-Jan-1999  bouyer Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
 1.7 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.6 07-Aug-2003  agc branches: 1.6.62; 1.6.74;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.5 16-Jul-1997  christos RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in
<machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS
define not LIBC_SCCS
 1.4 28-Dec-1995  jtc Use <machine/asm.h> instead of DEFS.h
 1.3 21-Oct-1993  jtc Gcc helper functions should still use the ENTRY() macro so they will be
show up in profiled code. (The gcc helper functions in the other ports
do this allready).
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.6.74.1 10-Aug-2014  tls Rebase.
 1.6.62.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4 04-Dec-1993  mycroft Clean up deleted files.
 1.3 21-Oct-1993  jtc Gcc helper functions should still use the ENTRY() macro so they will be
show up in profiled code. (The gcc helper functions in the other ports
do this allready).
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.6 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.5 07-Aug-2003  agc branches: 1.5.62; 1.5.74;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.4 16-Jul-1997  christos RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in
<machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS
define not LIBC_SCCS
 1.3 28-Dec-1995  jtc Use <machine/asm.h> instead of DEFS.h
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.5.74.1 10-Aug-2014  tls Rebase.
 1.5.62.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3 04-Dec-1993  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.7 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.6 07-Aug-2003  agc branches: 1.6.62; 1.6.74;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.5 16-Jul-1997  christos RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in
<machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS
define not LIBC_SCCS
 1.4 28-Dec-1995  jtc Use <machine/asm.h> instead of DEFS.h
 1.3 21-Oct-1993  jtc Gcc helper functions should still use the ENTRY() macro so they will be
show up in profiled code. (The gcc helper functions in the other ports
do this allready).
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.6.74.1 10-Aug-2014  tls Rebase.
 1.6.62.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4 04-Dec-1993  mycroft Clean up deleted files.
 1.3 21-Oct-1993  jtc Gcc helper functions should still use the ENTRY() macro so they will be
show up in profiled code. (The gcc helper functions in the other ports
do this allready).
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.14 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.13 12-Sep-2013  joerg branches: 1.13.2;
Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
 1.12 22-May-2011  joerg branches: 1.12.4; 1.12.10;
Use a plain float constant, no need to deal with messy 0r prefix
 1.11 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.10 22-Feb-1999  christos Don't use 1: label; it is uses by the PIC_PROLOGUE macro and we jmp in the
wrong place!
 1.9 16-Jul-1997  christos RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in
<machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS
define not LIBC_SCCS
 1.8 28-Dec-1995  jtc Remove #include "SYS.h"; it is not needed (by normal assembly functions)
 1.7 28-Dec-1995  jtc Use <machine/asm.h> instead of DEFS.h
 1.6 27-Jan-1994  mycroft Pedanticism.
 1.5 06-Dec-1993  pk Remove spurious PIC_EPILOGUE and PIC_GOTOFF macros.
 1.4 21-Oct-1993  jtc Gcc helper functions should still use the ENTRY() macro so they will be
show up in profiled code. (The gcc helper functions in the other ports
do this allready).
 1.3 21-Oct-1993  jtc So many files in arch/i386 have been changed I might as well run my
remove unecessary trailing whitespace script.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.12.10.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.12.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.13.2.1 10-Aug-2014  tls Rebase.
 1.5 04-Dec-1993  mycroft Clean up deleted files.
 1.4 21-Oct-1993  jtc Gcc helper functions should still use the ENTRY() macro so they will be
show up in profiled code. (The gcc helper functions in the other ports
do this allready).
 1.3 21-Oct-1993  jtc So many files in arch/i386 have been changed I might as well run my
remove unecessary trailing whitespace script.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.10 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.9 30-Sep-2011  christos branches: 1.9.8; 1.9.18;
make rounding work
 1.8 29-Sep-2011  christos even shorter
 1.7 29-Sep-2011  christos add a simpler version
 1.6 23-Aug-1999  kleink Use _ALIGN_TEXT from <machine/asm.h>.
 1.5 09-Jan-1998  perry RCS Id Police.
 1.4 20-Jun-1995  pk Make PIC safe.
 1.3 09-Apr-1995  mycroft Another optimization.
 1.2 09-Apr-1995  mycroft Optimize.
 1.1 07-Apr-1995  jtc Added flt_rounds, fpget{round,mask,sticky}.
 1.9.18.1 10-Aug-2014  tls Rebase.
 1.9.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3 28-Apr-2008  martin branches: 1.3.8;
Remove clause 3 and 4 from TNF licenses
 1.2 02-Feb-2007  christos branches: 1.2.10;
ext_int bit is no more.
 1.1 28-Oct-2003  kleink branches: 1.1.16;
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.
 1.1.16.1 07-May-2007  pavel Pull up following revision(s) (requested by manu in ticket #607):
lib/libc/arch/i386/gen/isnanl.c: revision 1.6
lib/libc/gdtoa/gdtoa.c: revision 1.2-1.3
lib/libc/arch/x86_64/gen/isnanl.c: revision 1.6
lib/libc/gdtoa/gdtoaimp.h: revision 1.6
sys/arch/m68k/include/ieee.h: revision 1.13
usr.bin/xlint/lint1/scan.l: revision 1.36-1.37
lib/libc/stdio/snprintf_ss.c: revision 1.4
lib/libc/arch/i386/gen/isfinitel.c: revision 1.2
lib/libc/stdio/vfscanf.c: revision 1.38
sys/arch/sparc/include/ieee.h: revision 1.11-1.12
lib/libc/gdtoa/dtoa.c: revision 1.4
lib/libc/stdio/Makefile.inc: revision 1.35
lib/libc/stdio/fvwrite.c: revision 1.17
lib/libc/arch/m68k/gen/fpclassifyl.c: revision 1.2
lib/libc/arch/i386/gen/isinfl.c: revision 1.6
lib/libc/arch/x86_64/gen/isinfl.c: revision 1.6
lib/libc/arch/x86_64/gen/isfinitel.c: revision 1.2
lib/libc/stdio/vfprintf.c: revision 1.55-1.57
lib/libc/stdio/vsnprintf_ss.c: revision 1.3
lib/libc/stdio/vfwprintf.c: revision 1.10
sys/arch/x86/include/ieee.h: revision 1.10
lib/libc/gdtoa/dmisc.c: revision 1.3
lib/libc/gdtoa/Makefile.inc: revision 1.5
sys/arch/hppa/include/ieee.h: revision 1.10
lib/libc/arch/x86_64/gen/fpclassifyl.c: revision 1.3
lib/libc/arch/i386/gen/fpclassifyl.c: revision 1.2
sys/sys/ieee754.h: revision 1.7
lib/libc/gdtoa/gdtoa.h: revision 1.7
include/stdio.h: revision 1.67-1.68
lib/libc/gdtoa/hdtoa.c: revision 1.1-1.4
lib/libc/gdtoa/ldtoa.c: revision 1.1-1.4
defined(_NETBSD_SOURCE) is equivalent to (!defined(_ANSI_SOURCE) &&
!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)), so there's no
need to check both of them.
Fix for issue reported in PR lib/35401 as well as related overflow bugs.
deal with hex doubles.
Instead of abusing stdio to get a signal-safe version of sprintf, provide one.
remove __SAFE
add long double and hex double support from freebsd.
make this compile.
add new prototypes.
add the new files to the build. Note I am not bumping libc now, because
these are not used yet.
Merge the int bit with the high fraction bit. Add constants/macros
needed by gdtoa.
add constants used by gdtoa
since the int bit is merged, do the explicit math.
ext_int bit is no more.
ext_int bit is no more.
- merge change from freebsd
- add support for building as vfprintf.c
- XXX: we strdup to simplify the freeing logic. This should be fixed for
efficiency in the vfprintf case.
use vfwprintf.c
enable wide doubles.
some int -> size_t
deal with sparc64 that has 112 bits of mantissa.
make extended precision gdtoa friendly.
int/size_t changes
make this gdtoa friendly.
remove dup definition
use dtoa() instead of returning empty when we don't have extended precision
information.
Fix previous, add forgotten pointer dereference in the call to dtoa().
Add a cheesy workaround marked XXX for the situation where the
strtod() implementation available in the environment does not
handle hex floats.
Discussed with and suggested by christos
From Christos: gdtoa fixes for m68k. M68k ports should build now, but
printing extended precision is a little off.
vax does not have <machine/ieee.h> or long double
It would be nice if the compiler provided something like __IEEE_MATH__
bring in FreeBSD's vfscanf() to gain multi-byte/collation support.
Unfortunately it is too difficult to make vfwscanf and this share
the same code like I did with printf, because for string parsing
the code is too different.
 1.2.10.1 18-May-2008  yamt sync with head.
 1.3.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.3.8.1 28-Apr-2008  martin file fpclassifyl.c was added on branch christos-time_t on 2008-04-28 20:22:57 +0000
 1.5 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.4 13-Jan-2002  thorpej branches: 1.4.64; 1.4.76;
Add internal names for fp{get,set}{mask,round,sticky}(), and
externally-visible weak aliases for the internal names.
 1.3 09-Jan-1998  perry branches: 1.3.12;
RCS Id Police.
 1.2 09-Apr-1995  mycroft Another optimization.
 1.1 07-Apr-1995  jtc Added flt_rounds, fpget{round,mask,sticky}.
 1.3.12.1 28-Jan-2002  nathanw Catch up to -current.
 1.4.76.1 10-Aug-2014  tls Rebase.
 1.4.64.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.1 26-Mar-2011  christos branches: 1.1.10; 1.1.20;
add fpgetprec/fpsetprec
 1.1.20.1 10-Aug-2014  tls Rebase.
 1.1.10.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.6 30-Sep-2011  christos branches: 1.6.8; 1.6.18;
make rounding work
 1.5 13-Jan-2002  thorpej Add internal names for fp{get,set}{mask,round,sticky}(), and
externally-visible weak aliases for the internal names.
 1.4 09-Jan-1998  perry branches: 1.4.12;
RCS Id Police.
 1.3 09-Apr-1995  mycroft Add fpset{mask,round,sticky}().
 1.2 09-Apr-1995  mycroft Another optimization.
 1.1 07-Apr-1995  jtc Added flt_rounds, fpget{round,mask,sticky}.
 1.4.12.1 28-Jan-2002  nathanw Catch up to -current.
 1.6.18.1 10-Aug-2014  tls Rebase.
 1.6.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.6 13-Jan-2002  thorpej branches: 1.6.64; 1.6.76;
Add internal names for fp{get,set}{mask,round,sticky}(), and
externally-visible weak aliases for the internal names.
 1.5 09-Jan-1998  perry branches: 1.5.12;
RCS Id Police.
 1.4 09-Apr-1995  mycroft Reverse sense of exception bits.
 1.3 09-Apr-1995  mycroft Another optimization.
 1.2 09-Apr-1995  jtc ENTRY(fpgetmask) -> ENTRY(fpgetsticky)
 1.1 07-Apr-1995  jtc Added flt_rounds, fpget{round,mask,sticky}.
 1.5.12.1 28-Jan-2002  nathanw Catch up to -current.
 1.6.76.1 10-Aug-2014  tls Rebase.
 1.6.64.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.4 13-Jan-2002  thorpej branches: 1.4.64; 1.4.76;
Add internal names for fp{get,set}{mask,round,sticky}(), and
externally-visible weak aliases for the internal names.
 1.3 09-Jan-1998  perry branches: 1.3.12;
RCS Id Police.
 1.2 09-Apr-1995  mycroft Stylistic change to match fpsetsticky().
 1.1 09-Apr-1995  mycroft Add fpset{mask,round,sticky}().
 1.3.12.1 28-Jan-2002  nathanw Catch up to -current.
 1.4.76.1 10-Aug-2014  tls Rebase.
 1.4.64.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.1 26-Mar-2011  christos branches: 1.1.10; 1.1.20;
add fpgetprec/fpsetprec
 1.1.20.1 10-Aug-2014  tls Rebase.
 1.1.10.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.5 30-Sep-2011  christos branches: 1.5.8; 1.5.18;
don't use %edi!
 1.4 30-Sep-2011  christos make rounding work
 1.3 13-Jan-2002  thorpej Add internal names for fp{get,set}{mask,round,sticky}(), and
externally-visible weak aliases for the internal names.
 1.2 09-Jan-1998  perry branches: 1.2.12;
RCS Id Police.
 1.1 09-Apr-1995  mycroft Add fpset{mask,round,sticky}().
 1.2.12.1 28-Jan-2002  nathanw Catch up to -current.
 1.5.18.1 10-Aug-2014  tls Rebase.
 1.5.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.6 13-Jan-2002  thorpej branches: 1.6.64; 1.6.76;
Add internal names for fp{get,set}{mask,round,sticky}(), and
externally-visible weak aliases for the internal names.
 1.5 09-Jan-1998  perry branches: 1.5.12;
RCS Id Police.
 1.4 09-Apr-1995  mycroft Reverse sense of exception bits.
 1.3 09-Apr-1995  mycroft Oops; need to use fnstenv/fldenv for this.
 1.2 09-Apr-1995  mycroft Fix typo.
 1.1 09-Apr-1995  mycroft Add fpset{mask,round,sticky}().
 1.5.12.1 28-Jan-2002  nathanw Catch up to -current.
 1.6.76.1 10-Aug-2014  tls Rebase.
 1.6.64.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6 19-Feb-2002  simonb 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).
 1.5 29-Aug-1999  mycroft branches: 1.5.10;
Trivial KNF.
 1.4 29-Aug-1999  mycroft Make the C version of frexp() consitent across platforms, and handle the
Inf/NaN case.
 1.3 10-Mar-1999  mycroft Use ieee.h structs and macros.
 1.2 13-Jul-1997  christos Fix RCSID's
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.5.10.1 08-Mar-2002  nathanw Catch up to -current.
 1.6 19-Feb-2002  simonb 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).
 1.5 13-Sep-2000  msaitoh branches: 1.5.2;
check LIBC_SCCS
 1.4 14-Nov-1998  christos delint
 1.3 26-Jul-1998  mycroft const poisoning.
 1.2 13-Jul-1997  christos Fix RCSID's
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.5.2.1 08-Mar-2002  nathanw Catch up to -current.
 1.4 06-Jun-2011  drochner make sure the infinity returned by HUGE_VALL has the "implicit"
bit set, otherwise it is invalid
This code is unlikely to be hit because gcc (and clang) use
their builtins for these special values.
 1.3 06-Apr-2011  christos branches: 1.3.2;
fix long double infinity.
 1.2 12-Jun-2005  lukem Add missing __RCSID()
 1.1 25-Oct-2003  kleink Add __infinityf and __infinityl, float respectively long double analogs
of __infinity.
 1.3.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.3 28-Apr-2008  martin branches: 1.3.8;
Remove clause 3 and 4 from TNF licenses
 1.2 02-Feb-2007  christos branches: 1.2.10;
ext_int bit is no more.
 1.1 29-Oct-2003  kleink branches: 1.1.16;
C99 7.12.3.2: add library portions of isfinite, but don't build these just
yet.
 1.1.16.1 07-May-2007  pavel Pull up following revision(s) (requested by manu in ticket #607):
lib/libc/arch/i386/gen/isnanl.c: revision 1.6
lib/libc/gdtoa/gdtoa.c: revision 1.2-1.3
lib/libc/arch/x86_64/gen/isnanl.c: revision 1.6
lib/libc/gdtoa/gdtoaimp.h: revision 1.6
sys/arch/m68k/include/ieee.h: revision 1.13
usr.bin/xlint/lint1/scan.l: revision 1.36-1.37
lib/libc/stdio/snprintf_ss.c: revision 1.4
lib/libc/arch/i386/gen/isfinitel.c: revision 1.2
lib/libc/stdio/vfscanf.c: revision 1.38
sys/arch/sparc/include/ieee.h: revision 1.11-1.12
lib/libc/gdtoa/dtoa.c: revision 1.4
lib/libc/stdio/Makefile.inc: revision 1.35
lib/libc/stdio/fvwrite.c: revision 1.17
lib/libc/arch/m68k/gen/fpclassifyl.c: revision 1.2
lib/libc/arch/i386/gen/isinfl.c: revision 1.6
lib/libc/arch/x86_64/gen/isinfl.c: revision 1.6
lib/libc/arch/x86_64/gen/isfinitel.c: revision 1.2
lib/libc/stdio/vfprintf.c: revision 1.55-1.57
lib/libc/stdio/vsnprintf_ss.c: revision 1.3
lib/libc/stdio/vfwprintf.c: revision 1.10
sys/arch/x86/include/ieee.h: revision 1.10
lib/libc/gdtoa/dmisc.c: revision 1.3
lib/libc/gdtoa/Makefile.inc: revision 1.5
sys/arch/hppa/include/ieee.h: revision 1.10
lib/libc/arch/x86_64/gen/fpclassifyl.c: revision 1.3
lib/libc/arch/i386/gen/fpclassifyl.c: revision 1.2
sys/sys/ieee754.h: revision 1.7
lib/libc/gdtoa/gdtoa.h: revision 1.7
include/stdio.h: revision 1.67-1.68
lib/libc/gdtoa/hdtoa.c: revision 1.1-1.4
lib/libc/gdtoa/ldtoa.c: revision 1.1-1.4
defined(_NETBSD_SOURCE) is equivalent to (!defined(_ANSI_SOURCE) &&
!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)), so there's no
need to check both of them.
Fix for issue reported in PR lib/35401 as well as related overflow bugs.
deal with hex doubles.
Instead of abusing stdio to get a signal-safe version of sprintf, provide one.
remove __SAFE
add long double and hex double support from freebsd.
make this compile.
add new prototypes.
add the new files to the build. Note I am not bumping libc now, because
these are not used yet.
Merge the int bit with the high fraction bit. Add constants/macros
needed by gdtoa.
add constants used by gdtoa
since the int bit is merged, do the explicit math.
ext_int bit is no more.
ext_int bit is no more.
- merge change from freebsd
- add support for building as vfprintf.c
- XXX: we strdup to simplify the freeing logic. This should be fixed for
efficiency in the vfprintf case.
use vfwprintf.c
enable wide doubles.
some int -> size_t
deal with sparc64 that has 112 bits of mantissa.
make extended precision gdtoa friendly.
int/size_t changes
make this gdtoa friendly.
remove dup definition
use dtoa() instead of returning empty when we don't have extended precision
information.
Fix previous, add forgotten pointer dereference in the call to dtoa().
Add a cheesy workaround marked XXX for the situation where the
strtod() implementation available in the environment does not
handle hex floats.
Discussed with and suggested by christos
From Christos: gdtoa fixes for m68k. M68k ports should build now, but
printing extended precision is a little off.
vax does not have <machine/ieee.h> or long double
It would be nice if the compiler provided something like __IEEE_MATH__
bring in FreeBSD's vfscanf() to gain multi-byte/collation support.
Unfortunately it is too difficult to make vfwscanf and this share
the same code like I did with printf, because for string parsing
the code is too different.
 1.2.10.1 18-May-2008  yamt sync with head.
 1.3.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.3.8.1 28-Apr-2008  martin file isfinitel.c was added on branch christos-time_t on 2008-04-28 20:22:57 +0000
 1.8 19-Feb-2002  simonb 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).
 1.7 22-Jan-2000  mycroft branches: 1.7.6;
Delint.
 1.6 29-Aug-1999  mycroft Separate isnan() into a separate module, and make isinf()/isnan() use ieee.h.
 1.5 14-Nov-1998  christos delint
 1.4 13-Oct-1998  kleink Need internal names for isinf() and isnan().
 1.3 13-Jul-1997  christos Add missing math.h include
Fix RCSIDs
 1.2 05-Feb-1996  jtc Add explicit return type
 1.1 07-Oct-1993  cgd branches: 1.1.4;
make an arch directory in libc, and move all machine dirs into it
 1.1.4.1 18-Apr-1995  jtc namespace protect isnan() and isinf()
 1.7.6.1 08-Mar-2002  nathanw Catch up to -current.
 1.6 02-Feb-2007  christos since the int bit is merged, do the explicit math.
 1.5 04-Mar-2004  kleink branches: 1.5.16;
* 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.
 1.4 27-Oct-2003  kleink Err, rename some members added in previous to make them reflect their
semantics better.
 1.3 27-Oct-2003  kleink Retire local union { floating-type; struct ieee_prec; } in favor of those
available from <machine/ieee.h>
 1.2 25-Oct-2003  kleink Update to account for separate handling of the explicit integer bit;
simplifies a little.
 1.1 24-Oct-2003  kleink * 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.
 1.5.16.1 07-May-2007  pavel Pull up following revision(s) (requested by manu in ticket #607):
lib/libc/arch/i386/gen/isnanl.c: revision 1.6
lib/libc/gdtoa/gdtoa.c: revision 1.2-1.3
lib/libc/arch/x86_64/gen/isnanl.c: revision 1.6
lib/libc/gdtoa/gdtoaimp.h: revision 1.6
sys/arch/m68k/include/ieee.h: revision 1.13
usr.bin/xlint/lint1/scan.l: revision 1.36-1.37
lib/libc/stdio/snprintf_ss.c: revision 1.4
lib/libc/arch/i386/gen/isfinitel.c: revision 1.2
lib/libc/stdio/vfscanf.c: revision 1.38
sys/arch/sparc/include/ieee.h: revision 1.11-1.12
lib/libc/gdtoa/dtoa.c: revision 1.4
lib/libc/stdio/Makefile.inc: revision 1.35
lib/libc/stdio/fvwrite.c: revision 1.17
lib/libc/arch/m68k/gen/fpclassifyl.c: revision 1.2
lib/libc/arch/i386/gen/isinfl.c: revision 1.6
lib/libc/arch/x86_64/gen/isinfl.c: revision 1.6
lib/libc/arch/x86_64/gen/isfinitel.c: revision 1.2
lib/libc/stdio/vfprintf.c: revision 1.55-1.57
lib/libc/stdio/vsnprintf_ss.c: revision 1.3
lib/libc/stdio/vfwprintf.c: revision 1.10
sys/arch/x86/include/ieee.h: revision 1.10
lib/libc/gdtoa/dmisc.c: revision 1.3
lib/libc/gdtoa/Makefile.inc: revision 1.5
sys/arch/hppa/include/ieee.h: revision 1.10
lib/libc/arch/x86_64/gen/fpclassifyl.c: revision 1.3
lib/libc/arch/i386/gen/fpclassifyl.c: revision 1.2
sys/sys/ieee754.h: revision 1.7
lib/libc/gdtoa/gdtoa.h: revision 1.7
include/stdio.h: revision 1.67-1.68
lib/libc/gdtoa/hdtoa.c: revision 1.1-1.4
lib/libc/gdtoa/ldtoa.c: revision 1.1-1.4
defined(_NETBSD_SOURCE) is equivalent to (!defined(_ANSI_SOURCE) &&
!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)), so there's no
need to check both of them.
Fix for issue reported in PR lib/35401 as well as related overflow bugs.
deal with hex doubles.
Instead of abusing stdio to get a signal-safe version of sprintf, provide one.
remove __SAFE
add long double and hex double support from freebsd.
make this compile.
add new prototypes.
add the new files to the build. Note I am not bumping libc now, because
these are not used yet.
Merge the int bit with the high fraction bit. Add constants/macros
needed by gdtoa.
add constants used by gdtoa
since the int bit is merged, do the explicit math.
ext_int bit is no more.
ext_int bit is no more.
- merge change from freebsd
- add support for building as vfprintf.c
- XXX: we strdup to simplify the freeing logic. This should be fixed for
efficiency in the vfprintf case.
use vfwprintf.c
enable wide doubles.
some int -> size_t
deal with sparc64 that has 112 bits of mantissa.
make extended precision gdtoa friendly.
int/size_t changes
make this gdtoa friendly.
remove dup definition
use dtoa() instead of returning empty when we don't have extended precision
information.
Fix previous, add forgotten pointer dereference in the call to dtoa().
Add a cheesy workaround marked XXX for the situation where the
strtod() implementation available in the environment does not
handle hex floats.
Discussed with and suggested by christos
From Christos: gdtoa fixes for m68k. M68k ports should build now, but
printing extended precision is a little off.
vax does not have <machine/ieee.h> or long double
It would be nice if the compiler provided something like __IEEE_MATH__
bring in FreeBSD's vfscanf() to gain multi-byte/collation support.
Unfortunately it is too difficult to make vfwscanf and this share
the same code like I did with printf, because for string parsing
the code is too different.
 1.3 19-Feb-2002  simonb 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).
 1.2 22-Jan-2000  mycroft branches: 1.2.6;
Delint.
 1.1 29-Aug-1999  mycroft Separate isnan() into a separate module, and make isinf()/isnan() use ieee.h.
 1.2.6.1 08-Mar-2002  nathanw Catch up to -current.
 1.8 05-Jun-2011  christos Revert previous and make frach be 0xc0000000 for NAN's generated by strtold()
as suggested by tron.
 1.7 04-Jun-2011  christos Make NAN tests consistent with other platforms and FreeBSD.
 1.6 02-Feb-2007  christos branches: 1.6.34;
since the int bit is merged, do the explicit math.
 1.5 04-Mar-2004  kleink branches: 1.5.16;
* 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.
 1.4 27-Oct-2003  kleink Err, rename some members added in previous to make them reflect their
semantics better.
 1.3 27-Oct-2003  kleink Retire local union { floating-type; struct ieee_prec; } in favor of those
available from <machine/ieee.h>
 1.2 25-Oct-2003  kleink Update to account for separate handling of the explicit integer bit;
simplifies a little.
 1.1 24-Oct-2003  kleink * 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.
 1.5.16.1 07-May-2007  pavel Pull up following revision(s) (requested by manu in ticket #607):
lib/libc/arch/i386/gen/isnanl.c: revision 1.6
lib/libc/gdtoa/gdtoa.c: revision 1.2-1.3
lib/libc/arch/x86_64/gen/isnanl.c: revision 1.6
lib/libc/gdtoa/gdtoaimp.h: revision 1.6
sys/arch/m68k/include/ieee.h: revision 1.13
usr.bin/xlint/lint1/scan.l: revision 1.36-1.37
lib/libc/stdio/snprintf_ss.c: revision 1.4
lib/libc/arch/i386/gen/isfinitel.c: revision 1.2
lib/libc/stdio/vfscanf.c: revision 1.38
sys/arch/sparc/include/ieee.h: revision 1.11-1.12
lib/libc/gdtoa/dtoa.c: revision 1.4
lib/libc/stdio/Makefile.inc: revision 1.35
lib/libc/stdio/fvwrite.c: revision 1.17
lib/libc/arch/m68k/gen/fpclassifyl.c: revision 1.2
lib/libc/arch/i386/gen/isinfl.c: revision 1.6
lib/libc/arch/x86_64/gen/isinfl.c: revision 1.6
lib/libc/arch/x86_64/gen/isfinitel.c: revision 1.2
lib/libc/stdio/vfprintf.c: revision 1.55-1.57
lib/libc/stdio/vsnprintf_ss.c: revision 1.3
lib/libc/stdio/vfwprintf.c: revision 1.10
sys/arch/x86/include/ieee.h: revision 1.10
lib/libc/gdtoa/dmisc.c: revision 1.3
lib/libc/gdtoa/Makefile.inc: revision 1.5
sys/arch/hppa/include/ieee.h: revision 1.10
lib/libc/arch/x86_64/gen/fpclassifyl.c: revision 1.3
lib/libc/arch/i386/gen/fpclassifyl.c: revision 1.2
sys/sys/ieee754.h: revision 1.7
lib/libc/gdtoa/gdtoa.h: revision 1.7
include/stdio.h: revision 1.67-1.68
lib/libc/gdtoa/hdtoa.c: revision 1.1-1.4
lib/libc/gdtoa/ldtoa.c: revision 1.1-1.4
defined(_NETBSD_SOURCE) is equivalent to (!defined(_ANSI_SOURCE) &&
!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)), so there's no
need to check both of them.
Fix for issue reported in PR lib/35401 as well as related overflow bugs.
deal with hex doubles.
Instead of abusing stdio to get a signal-safe version of sprintf, provide one.
remove __SAFE
add long double and hex double support from freebsd.
make this compile.
add new prototypes.
add the new files to the build. Note I am not bumping libc now, because
these are not used yet.
Merge the int bit with the high fraction bit. Add constants/macros
needed by gdtoa.
add constants used by gdtoa
since the int bit is merged, do the explicit math.
ext_int bit is no more.
ext_int bit is no more.
- merge change from freebsd
- add support for building as vfprintf.c
- XXX: we strdup to simplify the freeing logic. This should be fixed for
efficiency in the vfprintf case.
use vfwprintf.c
enable wide doubles.
some int -> size_t
deal with sparc64 that has 112 bits of mantissa.
make extended precision gdtoa friendly.
int/size_t changes
make this gdtoa friendly.
remove dup definition
use dtoa() instead of returning empty when we don't have extended precision
information.
Fix previous, add forgotten pointer dereference in the call to dtoa().
Add a cheesy workaround marked XXX for the situation where the
strtod() implementation available in the environment does not
handle hex floats.
Discussed with and suggested by christos
From Christos: gdtoa fixes for m68k. M68k ports should build now, but
printing extended precision is a little off.
vax does not have <machine/ieee.h> or long double
It would be nice if the compiler provided something like __IEEE_MATH__
bring in FreeBSD's vfscanf() to gain multi-byte/collation support.
Unfortunately it is too difficult to make vfwscanf and this share
the same code like I did with printf, because for string parsing
the code is too different.
 1.6.34.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.8 27-Jun-2006  drochner Build just the compatibility versions of frexp()/ldexp()/modf(), the
real implementation is in libm.
 1.7 04-Nov-2001  lukem fix WARNS=2 (-Wshadow) warnings
 1.6 10-Mar-1999  mycroft branches: 1.6.12;
Just some minor cleanup.
 1.5 15-Aug-1998  mycroft Assign my copyrights to TNF.
 1.4 13-Jul-1997  christos Add missing math.h include
Fix RCSIDs
 1.3 20-Dec-1996  cgd __asm rather than asm, for lint
 1.2 17-Feb-1995  jtc branches: 1.2.2;
Remove extra "u" constraint that caused gcc 2.6.3 not to compile this file.
Note that gcc 2.4.5, the compiler we are currently using, still compiles it
correctly after this change.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.2.2.2 17-Feb-1995  jtc Remove extra "u" constraint that caused gcc 2.6.3 not to compile this file.
Note that gcc 2.4.5, the compiler we are currently using, still compiles it
correctly after this change.
 1.2.2.1 17-Feb-1995  jtc file ldexp.c was added on branch ivory_soap on 1995-02-17 06:01:48 +0000
 1.6.12.1 14-Nov-2001  nathanw Catch up to -current.
 1.4 28-Apr-2008  martin branches: 1.4.8;
Remove clause 3 and 4 from TNF licenses
 1.3 11-May-2006  mrg branches: 1.3.18;
in makecontext(), sp is unsigned * so don't assign signed *'s to it.
 1.2 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.1 05-Mar-2001  nathanw branches: 1.1.2;
file makecontext.c was initially added on branch nathanw_sa.
 1.1.2.2 28-Jan-2002  nathanw A little more linting.
 1.1.2.1 05-Mar-2001  nathanw User-level support for LWPs and scheduler activations.
SVR4-style ucontext code by Klaus Klein.
 1.3.18.1 18-May-2008  yamt sync with head.
 1.4.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.4.8.1 28-Apr-2008  martin file makecontext.c was added on branch christos-time_t on 2008-04-28 20:22:57 +0000
 1.7 27-Jun-2006  drochner Build just the compatibility versions of frexp()/ldexp()/modf(), the
real implementation is in libm.
 1.6 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.5 16-Jul-1997  christos RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in
<machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS
define not LIBC_SCCS
 1.4 28-Dec-1995  jtc Use <machine/asm.h> instead of DEFS.h
 1.3 27-Jan-1994  mycroft Pedanticism.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.3 01-Mar-1995  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.4 22-Feb-2009  martin Make NAN a compile time constant (with help from the compiler). Suggested
by krister. Fixes PR 40695.
Make references to the old construct (which we can't remove for binary
compatibility reasons) emit a linker warning.
 1.3 15-Apr-2005  kleink branches: 1.3.2; 1.3.32;
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.
 1.2 19-Feb-2002  simonb 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).
 1.1 23-Dec-1999  kleink branches: 1.1.6;
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.
 1.1.6.1 08-Mar-2002  nathanw Catch up to -current.
 1.3.32.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.3.2.2 19-Apr-2005  tron Pull up revision 1.3 (requested by kleink in ticket #163):
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.
 1.3.2.1 15-Apr-2005  tron file nanf.c was added on branch netbsd-3 on 2005-04-19 12:30:50 +0000
 1.9 03-May-2025  riastradh libc/i386: Omit needless __PIC__ conditionals.

No binary change.

PR lib/59391: unnecessary __PIC__ conditionals clutter .S files
 1.8 23-May-2014  uebayasi branches: 1.8.36;
Put missing END() markers to set ELF symbol size.
 1.7 12-Sep-2013  joerg branches: 1.7.2;
Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
 1.6 28-Apr-2008  martin branches: 1.6.4; 1.6.8; 1.6.28;
Remove clause 3 and 4 from TNF licenses
 1.5 08-Nov-2006  drochner branches: 1.5.16;
-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.
 1.4 26-Jan-2003  kleink Update stack frame allocation for XMM state having been added to
mcontext_t; spotted by Frank van der Linden.
While here, also align the on-stack ucontext as required.
 1.3 26-Jan-2003  fvdl Fix comment that wasn't closed because of a typo (but harmless, since followed
by another comment).
 1.2 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.1 05-Mar-2001  nathanw branches: 1.1.2;
file resumecontext.S was initially added on branch nathanw_sa.
 1.1.2.1 05-Mar-2001  nathanw User-level support for LWPs and scheduler activations.
SVR4-style ucontext code by Klaus Klein.
 1.5.16.1 18-May-2008  yamt sync with head.
 1.6.28.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.6.8.1 28-Apr-2008  martin file resumecontext.S was added on branch christos-time_t on 2008-04-28 20:22:57 +0000
 1.6.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.7.2.1 10-Aug-2014  tls Rebase.
 1.8.36.1 02-Aug-2025  perseant Sync with HEAD
 1.19 03-May-2025  riastradh libc/i386: Omit needless __PIC__ conditionals.

No binary change.

PR lib/59391: unnecessary __PIC__ conditionals clutter .S files
 1.18 04-Apr-2024  riastradh branches: 1.18.2;
i386 longjmp: Restore stack first, then signal mask.

Otherwise, a pending signal may be delivered on the wrong stack when
we restore the signal mask.

While here:

- Tidy the code a little bit.
- Sprinkle comments to explain what's going on.
- Use forward branches for statically predicted not-taken.
=> val==0 is unlikely in longjmp

PR lib/57946
 1.17 23-May-2014  uebayasi branches: 1.17.26; 1.17.34;
Fix previous.
 1.16 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.15 12-Sep-2013  joerg branches: 1.15.2;
Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
 1.14 13-Sep-2005  christos branches: 1.14.44; 1.14.50;
compat core reorg.
 1.13 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.12 13-Feb-1999  christos For don't mess up the stack before calling syscall when using PIC_PROLOGUE.
 1.11 08-Feb-1999  christos Amend for the PLT fixes, things broke last night with the changes to SYS.h
and cerror.S. In particular, the syscalls in the files committed below were
broken.
 1.10 01-Jul-1998  thorpej Generate C labels with _C_LABEL().
 1.9 16-Jul-1997  christos RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in
<machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS
define not LIBC_SCCS
 1.8 28-Dec-1995  jtc Remove #include "SYS.h"; it is not needed (by normal assembly functions)
 1.7 28-Dec-1995  jtc Use <machine/asm.h> instead of DEFS.h
 1.6 24-Dec-1994  jtc Replaced pops with adds.
 1.5 27-Jan-1994  mycroft Pedanticism.
 1.4 21-Oct-1993  jtc So many files in arch/i386 have been changed I might as well run my
remove unecessary trailing whitespace script.
 1.3 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.2 20-Oct-1993  jtc Replaced instructions with immediate operands with compatible alternatives
saving a few bytes while the cycle count remains the same --- could
actually be faster, depending on the cache, prefetch queue, etc.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.14.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.14.44.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.15.2.1 10-Aug-2014  tls Rebase.
 1.17.34.1 23-Aug-2024  martin Pull up following revision(s) (requested by riastradh in ticket #795):

tests/lib/libc/setjmp/Makefile: revision 1.3
distrib/sets/lists/debug/mi: revision 1.425
lib/libc/arch/sh3/gen/setjmp.S: revision 1.12
lib/libc/arch/i386/gen/sigsetjmp.S: revision 1.19
lib/libc/arch/x86_64/gen/__setjmp14.S: revision 1.4
tests/lib/libc/setjmp/t_sigstack.c: revision 1.10
tests/lib/libc/setjmp/t_sigstack.c: revision 1.11
tests/lib/libc/setjmp/t_sigstack.c: revision 1.12
tests/lib/libc/setjmp/t_sigstack.c: revision 1.1
lib/libc/arch/sh3/gen/sigsetjmp.S: revision 1.11
tests/lib/libc/setjmp/t_sigstack.c: revision 1.2
tests/lib/libc/setjmp/t_sigstack.c: revision 1.3
tests/lib/libc/setjmp/t_sigstack.c: revision 1.4
tests/lib/libc/setjmp/t_sigstack.c: revision 1.5
tests/lib/libc/setjmp/t_sigstack.c: revision 1.6
lib/libc/arch/arm/gen/setjmp.S: revision 1.19
tests/lib/libc/setjmp/t_sigstack.c: revision 1.7
tests/lib/libc/setjmp/t_sigstack.c: revision 1.8
tests/lib/libc/setjmp/t_sigstack.c: revision 1.9
lib/libc/arch/i386/gen/setjmp.S: revision 1.18
lib/libc/arch/x86_64/gen/__sigsetjmp14.S: revision 1.4
distrib/sets/lists/tests/mi: revision 1.1306

longjmp(3): Add test for PR lib/57946.

longjmp(3): Paranoia: more error checking in PR lib/57946 test.

longjmp(3): Test signal mask vs stack restore with siglongjmp too.
PR lib/57946

longjmp(3) t_sigstack: Print which entry failed.
PR lib/57946

longjmp(3) t_sigstack: Note aarch64 seems to DTRT.
But only by code inspection; it appears to have another problem: on
re-entry, the signal handler is called on the normal stack, not on
the alternate signal stack.
PR lib/57946

longjmp(3) t_sigstack: Use a sigaltstack per handler entry.
longjmp evidently doesn't reset the state of whether the process is
executing on the alternate signal stack. So when we re-enter the
signal handler, the alternate stack appears to be still in use, and
the system chooses the original stack for the second call to the
signal handler -- which trips our assertion asking to verify that the
signal handler is always using an alternate stack.

Not strictly necessary for the signal handler to use an alternate
stack on re-entry, but this makes it clearer that the signal handler
itself is always using the alternate stack so we can verify that the
interrupted code is _not_ in the signal handler.
With this change, the test now passes on aarch64.
PR lib/57946

longjmp(3) t_sigstack: Fix fencepost error.
Extremely unlikely to cause trouble, but let's just turn that into
`never' to keep it easier for readers.
PR lib/57946

amd64 longjmp: Restore stack first, then signal mask.
Otherwise, a pending signal may be delivered on the wrong stack when
we restore the signal mask.

While here:
- Tidy the code a little bit.
- Sprinkle comments to explain what's going on.
- Use `xorl %eXX,%eXX' instead of `xorq %rXX,%rXX'.
=> Same effect, one byte shorter, breaks dep chain on more uarches.
- Use forward branches for statically predicted not-taken.
=> val==0 is unlikely in longjmp
PR lib/57946

i386 longjmp: Restore stack first, then signal mask.
Otherwise, a pending signal may be delivered on the wrong stack when
we restore the signal mask.

While here:
- Tidy the code a little bit.
- Sprinkle comments to explain what's going on.
- Use forward branches for statically predicted not-taken.
=> val==0 is unlikely in longjmp
PR lib/57946

arm longjmp: Restore stack first, then signal mask.
Otherwise, a pending signal may be delivered on the wrong stack when
we restore the signal mask.

While here:
- Move the botched sp and lr tests earlier.
PR lib/57946
arm has been fixed

tests/lib/libc/setjmp/t_sigstack: Add missing comment for 1.10.
PR lib/57946

sh3: siglongjmp - restore register context first (PR lib/57946)
 1.17.26.1 23-Aug-2024  martin Pull up following revision(s) (requested by riastradh in ticket #795):

tests/lib/libc/setjmp/Makefile: revision 1.3
distrib/sets/lists/debug/mi: revision 1.425
lib/libc/arch/sh3/gen/setjmp.S: revision 1.12
lib/libc/arch/i386/gen/sigsetjmp.S: revision 1.19
lib/libc/arch/x86_64/gen/__setjmp14.S: revision 1.4
tests/lib/libc/setjmp/t_sigstack.c: revision 1.10
tests/lib/libc/setjmp/t_sigstack.c: revision 1.11
tests/lib/libc/setjmp/t_sigstack.c: revision 1.12
tests/lib/libc/setjmp/t_sigstack.c: revision 1.1
lib/libc/arch/sh3/gen/sigsetjmp.S: revision 1.11
tests/lib/libc/setjmp/t_sigstack.c: revision 1.2
tests/lib/libc/setjmp/t_sigstack.c: revision 1.3
tests/lib/libc/setjmp/t_sigstack.c: revision 1.4
tests/lib/libc/setjmp/t_sigstack.c: revision 1.5
tests/lib/libc/setjmp/t_sigstack.c: revision 1.6
lib/libc/arch/arm/gen/setjmp.S: revision 1.19
tests/lib/libc/setjmp/t_sigstack.c: revision 1.7
tests/lib/libc/setjmp/t_sigstack.c: revision 1.8
tests/lib/libc/setjmp/t_sigstack.c: revision 1.9
lib/libc/arch/i386/gen/setjmp.S: revision 1.18
lib/libc/arch/x86_64/gen/__sigsetjmp14.S: revision 1.4
distrib/sets/lists/tests/mi: revision 1.1306 (patch)

longjmp(3): Add test for PR lib/57946.

longjmp(3): Paranoia: more error checking in PR lib/57946 test.

longjmp(3): Test signal mask vs stack restore with siglongjmp too.
PR lib/57946

longjmp(3) t_sigstack: Print which entry failed.
PR lib/57946

longjmp(3) t_sigstack: Note aarch64 seems to DTRT.
But only by code inspection; it appears to have another problem: on
re-entry, the signal handler is called on the normal stack, not on
the alternate signal stack.
PR lib/57946

longjmp(3) t_sigstack: Use a sigaltstack per handler entry.
longjmp evidently doesn't reset the state of whether the process is
executing on the alternate signal stack. So when we re-enter the
signal handler, the alternate stack appears to be still in use, and
the system chooses the original stack for the second call to the
signal handler -- which trips our assertion asking to verify that the
signal handler is always using an alternate stack.

Not strictly necessary for the signal handler to use an alternate
stack on re-entry, but this makes it clearer that the signal handler
itself is always using the alternate stack so we can verify that the
interrupted code is _not_ in the signal handler.
With this change, the test now passes on aarch64.
PR lib/57946

longjmp(3) t_sigstack: Fix fencepost error.
Extremely unlikely to cause trouble, but let's just turn that into
`never' to keep it easier for readers.
PR lib/57946

amd64 longjmp: Restore stack first, then signal mask.
Otherwise, a pending signal may be delivered on the wrong stack when
we restore the signal mask.

While here:
- Tidy the code a little bit.
- Sprinkle comments to explain what's going on.
- Use `xorl %eXX,%eXX' instead of `xorq %rXX,%rXX'.
=> Same effect, one byte shorter, breaks dep chain on more uarches.
- Use forward branches for statically predicted not-taken.
=> val==0 is unlikely in longjmp
PR lib/57946

i386 longjmp: Restore stack first, then signal mask.
Otherwise, a pending signal may be delivered on the wrong stack when
we restore the signal mask.

While here:
- Tidy the code a little bit.
- Sprinkle comments to explain what's going on.
- Use forward branches for statically predicted not-taken.
=> val==0 is unlikely in longjmp
PR lib/57946

arm longjmp: Restore stack first, then signal mask.
Otherwise, a pending signal may be delivered on the wrong stack when
we restore the signal mask.

While here:
- Move the botched sp and lr tests earlier.
PR lib/57946
arm has been fixed

tests/lib/libc/setjmp/t_sigstack: Add missing comment for 1.10.
PR lib/57946

sh3: siglongjmp - restore register context first (PR lib/57946)
 1.18.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 01-Mar-1995  mycroft Clean up deleted files.
 1.4 21-Oct-1993  jtc So many files in arch/i386 have been changed I might as well run my
remove unecessary trailing whitespace script.
 1.3 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.2 20-Oct-1993  jtc Replaced instructions with immediate operands with compatible alternatives
saving a few bytes while the cycle count remains the same --- could
actually be faster, depending on the cache, prefetch queue, etc.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.3 26-Apr-2019  maya Unify signbitl implementations.
(Unclear why they were different, it was only the comments that
differed)

Add a comment describing why the generic version works for both 80-bit
and 128-bit double.
 1.2 28-Apr-2008  martin branches: 1.2.8; 1.2.64;
Remove clause 3 and 4 from TNF licenses
 1.1 15-Jan-2004  kleink branches: 1.1.30;
Add C99 fpclassify(), isfinite(), isnormal(), and signbit() macros.
 1.1.30.1 18-May-2008  yamt sync with head.
 1.2.64.1 10-Jun-2019  christos Sync with HEAD
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file signbitl.c was added on branch christos-time_t on 2008-04-28 20:22:57 +0000
 1.20 03-May-2025  riastradh libc/i386: Omit needless __PIC__ conditionals.

No binary change.

PR lib/59391: unnecessary __PIC__ conditionals clutter .S files
 1.19 04-Apr-2024  riastradh branches: 1.19.2;
i386 longjmp: Restore stack first, then signal mask.

Otherwise, a pending signal may be delivered on the wrong stack when
we restore the signal mask.

While here:

- Tidy the code a little bit.
- Sprinkle comments to explain what's going on.
- Use forward branches for statically predicted not-taken.
=> val==0 is unlikely in longjmp

PR lib/57946
 1.18 23-May-2014  uebayasi branches: 1.18.26; 1.18.34;
Put missing END() markers to set ELF symbol size.
 1.17 12-Sep-2013  joerg branches: 1.17.2;
Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
 1.16 13-Sep-2005  christos branches: 1.16.44; 1.16.50;
compat core reorg.
 1.15 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.14 22-Feb-1999  christos Don't use 1: label; it is uses by the PIC_PROLOGUE macro and we jmp in the
wrong place!
 1.13 13-Feb-1999  christos For don't mess up the stack before calling syscall when using PIC_PROLOGUE.
 1.12 08-Feb-1999  christos Amend for the PLT fixes, things broke last night with the changes to SYS.h
and cerror.S. In particular, the syscalls in the files committed below were
broken.
 1.11 01-Jul-1998  thorpej Generate C labels with _C_LABEL().
 1.10 16-Jul-1997  christos RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in
<machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS
define not LIBC_SCCS
 1.9 28-Dec-1995  jtc Remove #include "SYS.h"; it is not needed (by normal assembly functions)
 1.8 28-Dec-1995  jtc Use <machine/asm.h> instead of DEFS.h
 1.7 24-Dec-1994  jtc Exchange offsets of "saved signal mask" and "signal mask saved" so
that the layout of sigjmp_bufs and jmp_bufs are the same (except
for the "signal mask saved" appended to the end).
 1.6 27-Jan-1994  mycroft Pedanticism.
 1.5 21-Oct-1993  jtc Use PIC_PLT macro with the function calls (as was done with setjmp()).
 1.4 21-Oct-1993  jtc So many files in arch/i386 have been changed I might as well run my
remove unecessary trailing whitespace script.
 1.3 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.2 20-Oct-1993  jtc Replaced instructions with immediate operands with compatible alternatives
saving a few bytes while the cycle count remains the same --- could
actually be faster, depending on the cache, prefetch queue, etc.
 1.1 19-Oct-1993  jtc sigsetjmp() for the i386.
 1.16.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.16.44.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.17.2.1 10-Aug-2014  tls Rebase.
 1.18.34.1 23-Aug-2024  martin Pull up following revision(s) (requested by riastradh in ticket #795):

tests/lib/libc/setjmp/Makefile: revision 1.3
distrib/sets/lists/debug/mi: revision 1.425
lib/libc/arch/sh3/gen/setjmp.S: revision 1.12
lib/libc/arch/i386/gen/sigsetjmp.S: revision 1.19
lib/libc/arch/x86_64/gen/__setjmp14.S: revision 1.4
tests/lib/libc/setjmp/t_sigstack.c: revision 1.10
tests/lib/libc/setjmp/t_sigstack.c: revision 1.11
tests/lib/libc/setjmp/t_sigstack.c: revision 1.12
tests/lib/libc/setjmp/t_sigstack.c: revision 1.1
lib/libc/arch/sh3/gen/sigsetjmp.S: revision 1.11
tests/lib/libc/setjmp/t_sigstack.c: revision 1.2
tests/lib/libc/setjmp/t_sigstack.c: revision 1.3
tests/lib/libc/setjmp/t_sigstack.c: revision 1.4
tests/lib/libc/setjmp/t_sigstack.c: revision 1.5
tests/lib/libc/setjmp/t_sigstack.c: revision 1.6
lib/libc/arch/arm/gen/setjmp.S: revision 1.19
tests/lib/libc/setjmp/t_sigstack.c: revision 1.7
tests/lib/libc/setjmp/t_sigstack.c: revision 1.8
tests/lib/libc/setjmp/t_sigstack.c: revision 1.9
lib/libc/arch/i386/gen/setjmp.S: revision 1.18
lib/libc/arch/x86_64/gen/__sigsetjmp14.S: revision 1.4
distrib/sets/lists/tests/mi: revision 1.1306

longjmp(3): Add test for PR lib/57946.

longjmp(3): Paranoia: more error checking in PR lib/57946 test.

longjmp(3): Test signal mask vs stack restore with siglongjmp too.
PR lib/57946

longjmp(3) t_sigstack: Print which entry failed.
PR lib/57946

longjmp(3) t_sigstack: Note aarch64 seems to DTRT.
But only by code inspection; it appears to have another problem: on
re-entry, the signal handler is called on the normal stack, not on
the alternate signal stack.
PR lib/57946

longjmp(3) t_sigstack: Use a sigaltstack per handler entry.
longjmp evidently doesn't reset the state of whether the process is
executing on the alternate signal stack. So when we re-enter the
signal handler, the alternate stack appears to be still in use, and
the system chooses the original stack for the second call to the
signal handler -- which trips our assertion asking to verify that the
signal handler is always using an alternate stack.

Not strictly necessary for the signal handler to use an alternate
stack on re-entry, but this makes it clearer that the signal handler
itself is always using the alternate stack so we can verify that the
interrupted code is _not_ in the signal handler.
With this change, the test now passes on aarch64.
PR lib/57946

longjmp(3) t_sigstack: Fix fencepost error.
Extremely unlikely to cause trouble, but let's just turn that into
`never' to keep it easier for readers.
PR lib/57946

amd64 longjmp: Restore stack first, then signal mask.
Otherwise, a pending signal may be delivered on the wrong stack when
we restore the signal mask.

While here:
- Tidy the code a little bit.
- Sprinkle comments to explain what's going on.
- Use `xorl %eXX,%eXX' instead of `xorq %rXX,%rXX'.
=> Same effect, one byte shorter, breaks dep chain on more uarches.
- Use forward branches for statically predicted not-taken.
=> val==0 is unlikely in longjmp
PR lib/57946

i386 longjmp: Restore stack first, then signal mask.
Otherwise, a pending signal may be delivered on the wrong stack when
we restore the signal mask.

While here:
- Tidy the code a little bit.
- Sprinkle comments to explain what's going on.
- Use forward branches for statically predicted not-taken.
=> val==0 is unlikely in longjmp
PR lib/57946

arm longjmp: Restore stack first, then signal mask.
Otherwise, a pending signal may be delivered on the wrong stack when
we restore the signal mask.

While here:
- Move the botched sp and lr tests earlier.
PR lib/57946
arm has been fixed

tests/lib/libc/setjmp/t_sigstack: Add missing comment for 1.10.
PR lib/57946

sh3: siglongjmp - restore register context first (PR lib/57946)
 1.18.26.1 23-Aug-2024  martin Pull up following revision(s) (requested by riastradh in ticket #795):

tests/lib/libc/setjmp/Makefile: revision 1.3
distrib/sets/lists/debug/mi: revision 1.425
lib/libc/arch/sh3/gen/setjmp.S: revision 1.12
lib/libc/arch/i386/gen/sigsetjmp.S: revision 1.19
lib/libc/arch/x86_64/gen/__setjmp14.S: revision 1.4
tests/lib/libc/setjmp/t_sigstack.c: revision 1.10
tests/lib/libc/setjmp/t_sigstack.c: revision 1.11
tests/lib/libc/setjmp/t_sigstack.c: revision 1.12
tests/lib/libc/setjmp/t_sigstack.c: revision 1.1
lib/libc/arch/sh3/gen/sigsetjmp.S: revision 1.11
tests/lib/libc/setjmp/t_sigstack.c: revision 1.2
tests/lib/libc/setjmp/t_sigstack.c: revision 1.3
tests/lib/libc/setjmp/t_sigstack.c: revision 1.4
tests/lib/libc/setjmp/t_sigstack.c: revision 1.5
tests/lib/libc/setjmp/t_sigstack.c: revision 1.6
lib/libc/arch/arm/gen/setjmp.S: revision 1.19
tests/lib/libc/setjmp/t_sigstack.c: revision 1.7
tests/lib/libc/setjmp/t_sigstack.c: revision 1.8
tests/lib/libc/setjmp/t_sigstack.c: revision 1.9
lib/libc/arch/i386/gen/setjmp.S: revision 1.18
lib/libc/arch/x86_64/gen/__sigsetjmp14.S: revision 1.4
distrib/sets/lists/tests/mi: revision 1.1306 (patch)

longjmp(3): Add test for PR lib/57946.

longjmp(3): Paranoia: more error checking in PR lib/57946 test.

longjmp(3): Test signal mask vs stack restore with siglongjmp too.
PR lib/57946

longjmp(3) t_sigstack: Print which entry failed.
PR lib/57946

longjmp(3) t_sigstack: Note aarch64 seems to DTRT.
But only by code inspection; it appears to have another problem: on
re-entry, the signal handler is called on the normal stack, not on
the alternate signal stack.
PR lib/57946

longjmp(3) t_sigstack: Use a sigaltstack per handler entry.
longjmp evidently doesn't reset the state of whether the process is
executing on the alternate signal stack. So when we re-enter the
signal handler, the alternate stack appears to be still in use, and
the system chooses the original stack for the second call to the
signal handler -- which trips our assertion asking to verify that the
signal handler is always using an alternate stack.

Not strictly necessary for the signal handler to use an alternate
stack on re-entry, but this makes it clearer that the signal handler
itself is always using the alternate stack so we can verify that the
interrupted code is _not_ in the signal handler.
With this change, the test now passes on aarch64.
PR lib/57946

longjmp(3) t_sigstack: Fix fencepost error.
Extremely unlikely to cause trouble, but let's just turn that into
`never' to keep it easier for readers.
PR lib/57946

amd64 longjmp: Restore stack first, then signal mask.
Otherwise, a pending signal may be delivered on the wrong stack when
we restore the signal mask.

While here:
- Tidy the code a little bit.
- Sprinkle comments to explain what's going on.
- Use `xorl %eXX,%eXX' instead of `xorq %rXX,%rXX'.
=> Same effect, one byte shorter, breaks dep chain on more uarches.
- Use forward branches for statically predicted not-taken.
=> val==0 is unlikely in longjmp
PR lib/57946

i386 longjmp: Restore stack first, then signal mask.
Otherwise, a pending signal may be delivered on the wrong stack when
we restore the signal mask.

While here:
- Tidy the code a little bit.
- Sprinkle comments to explain what's going on.
- Use forward branches for statically predicted not-taken.
=> val==0 is unlikely in longjmp
PR lib/57946

arm longjmp: Restore stack first, then signal mask.
Otherwise, a pending signal may be delivered on the wrong stack when
we restore the signal mask.

While here:
- Move the botched sp and lr tests earlier.
PR lib/57946
arm has been fixed

tests/lib/libc/setjmp/t_sigstack: Add missing comment for 1.10.
PR lib/57946

sh3: siglongjmp - restore register context first (PR lib/57946)
 1.19.2.1 02-Aug-2025  perseant Sync with HEAD
 1.6 01-Mar-1995  mycroft Clean up deleted files.
 1.5 21-Oct-1993  jtc Use PIC_PLT macro with the function calls (as was done with setjmp()).
 1.4 21-Oct-1993  jtc So many files in arch/i386 have been changed I might as well run my
remove unecessary trailing whitespace script.
 1.3 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.2 20-Oct-1993  jtc Replaced instructions with immediate operands with compatible alternatives
saving a few bytes while the cycle count remains the same --- could
actually be faster, depending on the cache, prefetch queue, etc.
 1.1 19-Oct-1993  jtc sigsetjmp() for the i386.
 1.9 03-May-2025  riastradh libc/i386: Omit needless __PIC__ conditionals.

No binary change.

PR lib/59391: unnecessary __PIC__ conditionals clutter .S files
 1.8 23-May-2014  uebayasi branches: 1.8.36;
Put missing END() markers to set ELF symbol size.
 1.7 12-Sep-2013  joerg branches: 1.7.2;
Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
 1.6 28-Apr-2008  martin branches: 1.6.4; 1.6.8; 1.6.28;
Remove clause 3 and 4 from TNF licenses
 1.5 07-Apr-2003  kleink branches: 1.5.30;
Make sure we reference getcontext() by its internal name.
 1.4 07-Apr-2003  kleink Fix stack pointer fixup of oucp (a relict from times when this
was implemented entirely different, and then bit rot commenced).
 1.3 26-Jan-2003  fvdl Fix wrong %esp fixup.
 1.2 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.1 05-Mar-2001  nathanw branches: 1.1.2;
file swapcontext.S was initially added on branch nathanw_sa.
 1.1.2.1 05-Mar-2001  nathanw User-level support for LWPs and scheduler activations.
SVR4-style ucontext code by Klaus Klein.
 1.5.30.1 18-May-2008  yamt sync with head.
 1.6.28.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.6.8.1 28-Apr-2008  martin file swapcontext.S was added on branch christos-time_t on 2008-04-28 20:22:57 +0000
 1.6.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.7.2.1 10-Aug-2014  tls Rebase.
 1.8.36.1 02-Aug-2025  perseant Sync with HEAD
 1.7 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.6 07-Aug-2003  agc branches: 1.6.62; 1.6.74;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.5 16-Jul-1997  christos RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in
<machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS
define not LIBC_SCCS
 1.4 28-Dec-1995  jtc Use <machine/asm.h> instead of DEFS.h
 1.3 21-Oct-1993  jtc Gcc helper functions should still use the ENTRY() macro so they will be
show up in profiled code. (The gcc helper functions in the other ports
do this allready).
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.6.74.1 10-Aug-2014  tls Rebase.
 1.6.62.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4 01-Mar-1995  mycroft Clean up deleted files.
 1.3 21-Oct-1993  jtc Gcc helper functions should still use the ENTRY() macro so they will be
show up in profiled code. (The gcc helper functions in the other ports
do this allready).
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.5 06-Dec-2009  uebayasi Rename ${SRCS.{alpha,arm,...}.gen} to ${LSRCS.{alpha,arm,...}.gen} because
they ended up in ${LSRCS}, not ${SRCS}. ${SRCS.*} namespace will be used
for more useful things. No functional changes intended.
 1.4 01-Aug-2003  lukem 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".
 1.3 15-Jan-1999  bouyer Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
 1.2 05-Nov-1997  cgd lint stubs for assembly routines.
 1.1 25-Feb-1995  cgd branches: 1.1.10;
need these now, with new net Makefile.inc
 1.1.10.1 08-Nov-1997  veego pull up changes from the trunk (approved by perry) from cgd:
>lint stubs for assembly routines.
 1.6 15-Jan-1999  bouyer Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
 1.5 16-Jul-1997  christos RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in
<machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS
define not LIBC_SCCS
 1.4 16-Mar-1994  jtc [hn]to[nh][sl] functions used xchgb %h1,%b1 instead of the faster (on the
i486 & i586) rorw $8, %w1.
 1.3 12-Mar-1994  jtc Use RCSID macro.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.3 04-Dec-1993  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.6 15-Jan-1999  bouyer Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
 1.5 16-Jul-1997  christos RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in
<machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS
define not LIBC_SCCS
 1.4 16-Mar-1994  jtc [hn]to[nh][sl] functions used xchgb %h1,%b1 instead of the faster (on the
i486 & i586) rorw $8, %w1.
 1.3 12-Mar-1994  jtc Use RCSID macro.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.3 04-Dec-1993  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.6 15-Jan-1999  bouyer Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
 1.5 16-Jul-1997  christos RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in
<machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS
define not LIBC_SCCS
 1.4 16-Mar-1994  jtc [hn]to[nh][sl] functions used xchgb %h1,%b1 instead of the faster (on the
i486 & i586) rorw $8, %w1.
 1.3 12-Mar-1994  jtc Use RCSID macro.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.3 04-Dec-1993  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.6 15-Jan-1999  bouyer Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
 1.5 16-Jul-1997  christos RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in
<machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS
define not LIBC_SCCS
 1.4 16-Mar-1994  jtc [hn]to[nh][sl] functions used xchgb %h1,%b1 instead of the faster (on the
i486 & i586) rorw $8, %w1.
 1.3 12-Mar-1994  jtc Use RCSID macro.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.3 04-Dec-1993  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.9 11-Aug-2009  dsl Change NO_SRCS lines to specify .S in order to exclude the .c file from
SRCS but add it to LSRCS (sort of makes sense!).
 1.8 31-Jul-2009  dsl Don't remove imaxdiv.c
 1.7 31-Jul-2009  dsl Add the 'abs', 'div' and 'erand48' sources to stdlib/Makefile.inc.
Change the arch files only include the .S files.
This adds imaxdiv() to some archs where it was missing.
 1.6 04-Aug-2008  matt branches: 1.6.6;
Add C99 functions imaxabs and imaxdiv.
 1.5 22-Mar-2006  drochner branches: 1.5.20;
build erand48_ieee754.c on everything but vax
 1.4 01-Aug-2003  lukem 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".
 1.3 06-Mar-2000  kleink Add ISO C99 long long integer general utility interfaces; partially addresses
PR standards/9482.
 1.2 05-Nov-1997  cgd branches: 1.2.2;
lint stubs for assembly routines.
 1.1 05-Nov-1997  cgd A foolish consistency... gen, net, and string all get MD sources
specified by including a Makefile.inc from the appropriate MD directory.
stdlib doesn't do that, but there's no reason that it shouldn't (and
it'd be nice to eliminate the 'if's from the MI stdlib Makefile.inc).
 1.2.2.2 08-Nov-1997  veego pull up changes from the trunk (approved by perry) from cgd:
>A foolish consistency... gen, net, and string all get MD sources
>specified by including a Makefile.inc from the appropriate MD directory.
>stdlib doesn't do that, but there's no reason that it shouldn't (and
>it'd be nice to eliminate the 'if's from the MI stdlib Makefile.inc).
 1.2.2.1 05-Nov-1997  veego file Makefile.inc was added on branch netbsd-1-3 on 1997-11-08 21:56:37 +0000
 1.5.20.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.6.6.2 04-Aug-2008  matt Add C99 functions imaxabs and imaxdiv.
 1.6.6.1 04-Aug-2008  matt file Makefile.inc was added on branch christos-time_t on 2008-08-04 21:29:29 +0000
 1.8 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.7 07-Aug-2003  agc branches: 1.7.62; 1.7.74;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.6 16-Jul-1997  christos RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in
<machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS
define not LIBC_SCCS
 1.5 16-Mar-1994  jtc Smaller & Faster.
 1.4 12-Mar-1994  jtc Use RCSID macro.
 1.3 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.2 08-Oct-1993  jtc Provide an assembly language version of labs().
Since ints and longs are both 32 bits on a i386, we could alias abs()
and labs() together as mycroft did with memmove()/memcpy(), but I'm
waiting on an interpretation ruling to see if it is legal.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.7.74.1 10-Aug-2014  tls Rebase.
 1.7.62.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4 04-Dec-1993  mycroft Clean up deleted files.
 1.3 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.2 08-Oct-1993  jtc Provide an assembly language version of labs().
Since ints and longs are both 32 bits on a i386, we could alias abs()
and labs() together as mycroft did with memmove()/memcpy(), but I'm
waiting on an interpretation ruling to see if it is legal.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.10 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.9 12-Jun-2011  plunky branches: 1.9.8; 1.9.18;
Functions that return a struct or union, must set %eax to the value
of the original address of the callers area before it returns.

(System V ABI, i386 supplement, fourth edition, page 3-14)
 1.8 26-Jul-2003  salo branches: 1.8.54;
netbsd.org->NetBSD.org
 1.7 08-Jan-2001  lukem rcsid & whitespace police
 1.6 08-Jan-2001  fvdl Make these actually work (fixes PR 11914).
 1.5 28-Apr-1995  jtc branches: 1.5.20;
Winning Strategies has placed this code into the Public Domain
 1.4 12-Mar-1994  jtc Use RCSID macro.
 1.3 28-Jan-1994  jtc Fix spelling error in Copyright notice
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 08-Oct-1993  jtc Provide i386 versions of div and ldiv -- they are simpler than the C versions,
since the idiv instruction does the right thing wrt truncating towards zero.
 1.5.20.1 26-Jan-2001  jhawk Pull up revision 1.6 (requested by fvdl):
Implement workinf versions of div() and ldev(). Previously they returned
garbage, but were generally unused.
 1.8.54.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.9.18.1 10-Aug-2014  tls Rebase.
 1.9.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3 04-Dec-1993  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 08-Oct-1993  jtc Provide i386 versions of div and ldiv -- they are simpler than the C versions,
since the idiv instruction does the right thing wrt truncating towards zero.
 1.8 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.7 07-Aug-2003  agc branches: 1.7.62; 1.7.74;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.6 16-Jul-1997  christos RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in
<machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS
define not LIBC_SCCS
 1.5 16-Mar-1994  jtc Smaller & Faster.
 1.4 12-Mar-1994  jtc Use RCSID macro.
 1.3 21-Oct-1993  jtc So many files in arch/i386 have been changed I might as well run my
remove unecessary trailing whitespace script.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 08-Oct-1993  jtc Provide an assembly language version of labs().
Since ints and longs are both 32 bits on a i386, we could alias abs()
and labs() together as mycroft did with memmove()/memcpy(), but I'm
waiting on an interpretation ruling to see if it is legal.
 1.7.74.1 10-Aug-2014  tls Rebase.
 1.7.62.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4 04-Dec-1993  mycroft Clean up deleted files.
 1.3 21-Oct-1993  jtc So many files in arch/i386 have been changed I might as well run my
remove unecessary trailing whitespace script.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 08-Oct-1993  jtc Provide an assembly language version of labs().
Since ints and longs are both 32 bits on a i386, we could alias abs()
and labs() together as mycroft did with memmove()/memcpy(), but I'm
waiting on an interpretation ruling to see if it is legal.
 1.10 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.9 12-Jun-2011  plunky branches: 1.9.8; 1.9.18;
Functions that return a struct or union, must set %eax to the value
of the original address of the callers area before it returns.

(System V ABI, i386 supplement, fourth edition, page 3-14)
 1.8 26-Jul-2003  salo branches: 1.8.54;
netbsd.org->NetBSD.org
 1.7 08-Jan-2001  lukem rcsid & whitespace police
 1.6 08-Jan-2001  fvdl Make these actually work (fixes PR 11914).
 1.5 28-Apr-1995  jtc branches: 1.5.20;
Winning Strategies has placed this code into the Public Domain
 1.4 12-Mar-1994  jtc Use RCSID macro.
 1.3 28-Jan-1994  jtc Fix spelling error in Copyright notice
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 08-Oct-1993  jtc Provide i386 versions of div and ldiv -- they are simpler than the C versions,
since the idiv instruction does the right thing wrt truncating towards zero.
 1.5.20.1 26-Jan-2001  jhawk Pull up revision 1.6 (requested by fvdl):
Implement workinf versions of div() and ldev(). Previously they returned
garbage, but were generally unused.
 1.8.54.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.9.18.1 10-Aug-2014  tls Rebase.
 1.9.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3 04-Dec-1993  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 08-Oct-1993  jtc Provide i386 versions of div and ldiv -- they are simpler than the C versions,
since the idiv instruction does the right thing wrt truncating towards zero.
 1.6 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.5 04-Aug-2008  matt branches: 1.5.6; 1.5.26; 1.5.38;
Add C99 functions imaxabs and imaxdiv.
 1.4 07-Aug-2003  agc branches: 1.4.32;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.3 29-May-2001  kleink Fix renaming botch in previous.
 1.2 29-May-2001  kleink Add missing internal names and weak aliases to assembly versions.
 1.1 06-Mar-2000  kleink branches: 1.1.6;
Add ISO C99 long long integer general utility interfaces; partially addresses
PR standards/9482.
 1.1.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.4.32.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.5.38.1 10-Aug-2014  tls Rebase.
 1.5.26.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.6.2 04-Aug-2008  matt Add C99 functions imaxabs and imaxdiv.
 1.5.6.1 04-Aug-2008  matt file llabs.S was added on branch christos-time_t on 2008-08-04 21:29:29 +0000
 1.6 27-Jan-2020  ad Make x86 use the C versions of bcmp() and memcmp().
 1.5 30-Jul-2009  dsl branches: 1.5.46;
If SRCS contains any .S files then remove the corresponding .c file from
SRCS and add to LSRCS (for lint).
Change the 'string' Makefiles so that the arch/*/string/Makefile.inc
need only specify the .S files for that architecture and not the .c
files for all the files they don't override.
 1.4 17-Jul-2009  dsl Change all archs so that strchr.[cS] and strrchr.[cS] exist and generate
duplicate symbols for index() and rindex().
libc and kernel build ok for affected archs (i386, amd64, vax, sun3,
evbmips-eb) all seem ok.
(vax might lose an asm index() - but comments imply it is worse than the C)
 1.3 01-Aug-2003  lukem 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".
 1.2 05-Nov-1997  cgd lint stubs for assembly routines.
 1.1 20-Mar-1995  mycroft branches: 1.1.10;
Separate machine dependencies.
 1.1.10.1 08-Nov-1997  veego pull up changes from the trunk (approved by perry) from cgd:
>lint stubs for assembly routines.
 1.5.46.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.10 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.9 12-Nov-2007  ad branches: 1.9.36; 1.9.48;
Don't unconditionally clear the direction flag. The ABI says it must always
be clear when making a function call, and 'cld' takes about 50 clock cyles
on the P4.
 1.8 26-Jul-2003  salo branches: 1.8.22;
netbsd.org->NetBSD.org
 1.7 28-Apr-1995  jtc $Id: $ -> $NetBSD: $
 1.6 28-Apr-1995  jtc Winning Strategies has placed this code into the Public Domain
 1.5 22-Mar-1994  jtc mem -> reg & reg->reg moves take the same time; so save a cycle by reading
the block length from the stack instead of caching it in a register.
 1.4 12-Mar-1994  jtc Use RCSID macro for RCS ID's.
 1.3 28-Jan-1994  jtc Fix spelling error in Copyright notice
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.8.22.1 09-Jan-2008  matt sync with HEAD
 1.9.48.1 10-Aug-2014  tls Rebase.
 1.9.36.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3 04-Dec-1993  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.15 09-Feb-2005  christos Bring back the head versions. Apparently the problem is a pkgsrc issue
unrelated to strings.
 1.14 07-Feb-2005  christos Revert everything to 2005-02-03 until the code is properly tested. Building
kde3 breaks with the head code.
 1.13 03-Feb-2005  dsl Pull optimised code from memcpy.S
Maybe bcopy can be killed one day...
 1.12 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.11 29-Oct-2002  junyoung Save a jmp for memcpy(3).
 1.10 29-Oct-2002  junyoung memcpy(3) no longer deals with overlap case; it's now forward-only.
 1.9 29-Oct-2002  junyoung Get rid of pointer wraparound check. Ok'ed by TAMURA Kent.
 1.8 10-Jul-2002  kent Avoid redundant memory access.
Fix diagnostic code for bcopy().
 1.7 04-Jul-2002  kent memcpy/memmove/bcopy: Add diagnostic code to check pointer wraparound.
The code is enabled only when _DIAGNOSTIC is defined.
 1.6 12-Nov-1996  jtc branches: 1.6.14;
Changed the test that determines whether or not source and destination
memory regions are "potentially overlapping" to a test that determines
that the regions are actually overlapping. Because the code for the
overlapping case is seven instructions longer, this signifcantly
improves performance in the average case.
 1.5 28-Apr-1995  jtc $Id: $ -> $NetBSD: $
 1.4 12-Mar-1994  jtc Use RCSID macro for RCS ID's.
 1.3 10-Dec-1993  mycroft Share code.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.6.14.2 11-Nov-2002  nathanw Catch up to -current
 1.6.14.1 01-Aug-2002  nathanw Catch up to -current.
 1.3 04-Dec-1993  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.12 09-Feb-2005  christos Bring back the head versions. Apparently the problem is a pkgsrc issue
unrelated to strings.
 1.11 07-Feb-2005  christos Revert everything to 2005-02-03 until the code is properly tested. Building
kde3 breaks with the head code.
 1.10 03-Feb-2005  dsl A faster implementation.
'rep stos' is slow to setup on modern processors, so don't use it to
align the transfer.
Also not that 8 byte alignment is faster on Intel processors
 1.9 26-Jul-2003  salo netbsd.org->NetBSD.org
 1.8 28-Apr-1995  jtc $Id: $ -> $NetBSD: $
 1.7 28-Apr-1995  jtc Winning Strategies has placed this code into the Public Domain
 1.6 05-Feb-1995  mycroft Optimize better.
 1.5 12-Mar-1994  jtc Use RCSID macro for RCS ID's.
 1.4 28-Jan-1994  jtc Fix spelling error in Copyright notice
 1.3 21-Oct-1993  jtc So many files in arch/i386 have been changed I might as well run my
remove unecessary trailing whitespace script.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.4 04-Dec-1993  mycroft Clean up deleted files.
 1.3 21-Oct-1993  jtc So many files in arch/i386 have been changed I might as well run my
remove unecessary trailing whitespace script.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.10 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 1.9 26-Jul-2003  salo netbsd.org->NetBSD.org
 1.8 23-Aug-1999  kleink Use _ALIGN_TEXT from <machine/asm.h>.
 1.7 28-Apr-1995  jtc $Id: $ -> $NetBSD: $
 1.6 28-Apr-1995  jtc Winning Strategies has placed this code into the Public Domain
 1.5 12-Mar-1994  jtc Use RCSID macro for RCS ID's.
 1.4 28-Jan-1994  jtc Fix spelling error in Copyright notice
 1.3 21-Oct-1993  jtc So many files in arch/i386 have been changed I might as well run my
remove unecessary trailing whitespace script.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.4 04-Dec-1993  mycroft Clean up deleted files.
 1.3 21-Oct-1993  jtc So many files in arch/i386 have been changed I might as well run my
remove unecessary trailing whitespace script.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.14 09-Feb-2005  christos Bring back the head versions. Apparently the problem is a pkgsrc issue
unrelated to strings.
 1.13 07-Feb-2005  christos Revert everything to 2005-02-03 until the code is properly tested. Building
kde3 breaks with the head code.
 1.12 04-Feb-2005  drochner switch to J.T.Conklin's optimized str* functions
(submitted per PR i386/25263)
 1.11 26-Jul-2003  salo netbsd.org->NetBSD.org
 1.10 07-Aug-2000  ad %edx is free; use it instead of %ebx.
 1.9 23-Aug-1999  kleink Use _ALIGN_TEXT from <machine/asm.h>.
 1.8 28-Apr-1995  jtc $Id: $ -> $NetBSD: $
 1.7 28-Apr-1995  jtc Winning Strategies has placed this code into the Public Domain
 1.6 12-Mar-1994  jtc Use RCSID macro for RCS ID's.
 1.5 14-Feb-1994  mycroft Style police. Use `je' and `jne' only on the result of an equality test;
use `jz' and `jnz' in all other cases.
 1.4 28-Jan-1994  jtc Fix spelling error in Copyright notice
 1.3 08-Dec-1993  jtc No reason these can't share code...
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.3 04-Dec-1993  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.16 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 1.15 02-Aug-2005  rpaulo Fix typos found by Giorgos Keramid and Steve Kargl on freebsd-arch mailing
list. They were found on libc x86_64 MD code, but I noticed that they are
present on i386 too.
 1.14 09-Feb-2005  christos Bring back the head versions. Apparently the problem is a pkgsrc issue
unrelated to strings.
 1.13 07-Feb-2005  christos Revert everything to 2005-02-03 until the code is properly tested. Building
kde3 breaks with the head code.
 1.12 06-Feb-2005  christos PR/29248: Geoff C. Wing: memchr broken after latest commit.
Apply fix submitted by jtc: The problem was that his regression tests
never checked for characters with the high bit set. Change movl to movzbl
where it was not done yet. In addition strrchr.S missed a jump to Lzero.
 1.11 04-Feb-2005  drochner switch to J.T.Conklin's optimized str* functions
(submitted per PR i386/25263)
 1.10 26-Jul-2003  salo netbsd.org->NetBSD.org
 1.9 23-Aug-1999  kleink Use _ALIGN_TEXT from <machine/asm.h>.
 1.8 28-Apr-1995  jtc $Id: $ -> $NetBSD: $
 1.7 28-Apr-1995  jtc Winning Strategies has placed this code into the Public Domain
 1.6 24-Nov-1994  mycroft If len == 0, then the result must be 0 regardless of the other arguments.
 1.5 12-Mar-1994  jtc Use RCSID macro for RCS ID's.
 1.4 14-Feb-1994  mycroft Style police. Use `je' and `jne' only on the result of an equality test;
use `jz' and `jnz' in all other cases.
 1.3 28-Jan-1994  jtc Fix spelling error in Copyright notice
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.3 04-Dec-1993  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.12 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 1.11 26-Jul-2003  salo netbsd.org->NetBSD.org
 1.10 23-Mar-2002  ross Fix minor syntax warnings.
 1.9 19-May-1997  jtc branches: 1.9.14;
Use xorl/movb instead of movzbl when loading registers before computing
the return value.
 1.8 28-Apr-1995  jtc $Id: $ -> $NetBSD: $
 1.7 28-Apr-1995  jtc Winning Strategies has placed this code into the Public Domain
 1.6 22-Mar-1994  jtc mem -> reg & reg->reg moves take the same time; so save a cycle by reading
the block length from the stack instead of caching it in a register.
 1.5 12-Mar-1994  jtc Use RCSID macro for RCS ID's.
 1.4 07-Feb-1994  jtc Use movzbl, not movsbl, to zero extend for unsigned comparison.
Fix from Bruce Evans.
 1.3 28-Jan-1994  jtc Fix spelling error in Copyright notice
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.9.14.1 25-Apr-2002  nathanw Catch up to -current.
 1.3 04-Dec-1993  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.6 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 1.5 09-Feb-2005  christos Bring back the head versions. Apparently the problem is a pkgsrc issue
unrelated to strings.
 1.4 07-Feb-2005  christos Revert everything to 2005-02-03 until the code is properly tested. Building
kde3 breaks with the head code.
 1.3 03-Feb-2005  dsl Bring code in from obsolesent bcopy.S
Optimise to avoid mis-predicted braches and 'rep movsb' for small %cx.
 1.2 09-Jan-1998  perry RCS Id Police.
 1.1 10-Dec-1993  mycroft Share code.
 1.8 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 1.7 09-Feb-2005  christos Bring back the head versions. Apparently the problem is a pkgsrc issue
unrelated to strings.
 1.6 07-Feb-2005  christos Revert everything to 2005-02-03 until the code is properly tested. Building
kde3 breaks with the head code.
 1.5 03-Feb-2005  dsl Bring code in from obsolesent bcopy.S
Optimise to avoid mis-predicted braches and 'rep movsb' for small %cx.
 1.4 09-Jan-1998  perry RCS Id Police.
 1.3 10-Dec-1993  mycroft Share code.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.3 01-Mar-1995  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.13 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 1.12 09-Feb-2005  christos Bring back the head versions. Apparently the problem is a pkgsrc issue
unrelated to strings.
 1.11 07-Feb-2005  christos Revert everything to 2005-02-03 until the code is properly tested. Building
kde3 breaks with the head code.
 1.10 03-Feb-2005  dsl A faster implementation.
'rep stos' is slow to setup on modern processors, so don't use it to
align the transfer.
Also not that 8 byte alignment is faster on Intel processors
 1.9 26-Jul-2003  salo netbsd.org->NetBSD.org
 1.8 28-Apr-1995  jtc $Id: $ -> $NetBSD: $
 1.7 28-Apr-1995  jtc Winning Strategies has placed this code into the Public Domain
 1.6 12-Mar-1994  jtc Use RCSID macro for RCS ID's.
 1.5 28-Jan-1994  jtc Fix spelling error in Copyright notice
 1.4 10-Dec-1993  mycroft Shorten setup for longword operations a little.
 1.3 21-Oct-1993  jtc So many files in arch/i386 have been changed I might as well run my
remove unecessary trailing whitespace script.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.4 01-Mar-1995  mycroft Clean up deleted files.
 1.3 21-Oct-1993  jtc So many files in arch/i386 have been changed I might as well run my
remove unecessary trailing whitespace script.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.14 09-Feb-2005  christos Bring back the head versions. Apparently the problem is a pkgsrc issue
unrelated to strings.
 1.13 07-Feb-2005  christos Revert everything to 2005-02-03 until the code is properly tested. Building
kde3 breaks with the head code.
 1.12 04-Feb-2005  drochner switch to J.T.Conklin's optimized str* functions
(submitted per PR i386/25263)
 1.11 26-Jul-2003  salo netbsd.org->NetBSD.org
 1.10 23-Aug-1999  kleink Use _ALIGN_TEXT from <machine/asm.h>.
 1.9 28-Apr-1995  jtc $Id: $ -> $NetBSD: $
 1.8 28-Apr-1995  jtc Winning Strategies has placed this code into the Public Domain
 1.7 12-Mar-1994  jtc Use RCSID macro for RCS ID's.
 1.6 14-Feb-1994  mycroft Style police. Use `je' and `jne' only on the result of an equality test;
use `jz' and `jnz' in all other cases.
 1.5 28-Jan-1994  jtc Fix spelling error in Copyright notice
 1.4 08-Dec-1993  jtc No reason these can't share code...
 1.3 21-Oct-1993  jtc So many files in arch/i386 have been changed I might as well run my
remove unecessary trailing whitespace script.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.4 01-Mar-1995  mycroft Clean up deleted files.
 1.3 21-Oct-1993  jtc So many files in arch/i386 have been changed I might as well run my
remove unecessary trailing whitespace script.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.14 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 1.13 09-Feb-2005  christos Bring back the head versions. Apparently the problem is a pkgsrc issue
unrelated to strings.
 1.12 07-Feb-2005  christos Revert everything to 2005-02-03 until the code is properly tested. Building
kde3 breaks with the head code.
 1.11 04-Feb-2005  drochner switch to J.T.Conklin's optimized str* functions
(submitted per PR i386/25263)
 1.10 26-Jul-2003  salo netbsd.org->NetBSD.org
 1.9 23-Aug-1999  kleink Use _ALIGN_TEXT from <machine/asm.h>.
 1.8 28-Apr-1995  jtc $Id: $ -> $NetBSD: $
 1.7 28-Apr-1995  jtc Winning Strategies has placed this code into the Public Domain
 1.6 12-Mar-1994  jtc Use RCSID macro for RCS ID's.
 1.5 14-Feb-1994  mycroft Style police. Use `je' and `jne' only on the result of an equality test;
use `jz' and `jnz' in all other cases.
 1.4 14-Feb-1994  jtc Fix spelling mistake: cashe -> cache.
 1.3 28-Jan-1994  jtc Fix spelling error in Copyright notice
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.3 01-Mar-1995  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.9 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 1.8 09-Feb-2005  christos Bring back the head versions. Apparently the problem is a pkgsrc issue
unrelated to strings.
 1.7 07-Feb-2005  christos Revert everything to 2005-02-03 until the code is properly tested. Building
kde3 breaks with the head code.
 1.6 06-Feb-2005  christos PR/29248: Geoff C. Wing: memchr broken after latest commit.
Apply fix submitted by jtc: The problem was that his regression tests
never checked for characters with the high bit set. Change movl to movzbl
where it was not done yet. In addition strrchr.S missed a jump to Lzero.
 1.5 04-Feb-2005  drochner switch to J.T.Conklin's optimized str* functions
(submitted per PR i386/25263)
 1.4 09-Jan-1998  perry RCS Id Police.
 1.3 08-Dec-1993  jtc No reason these can't share code...
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.3 01-Mar-1995  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.18 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 1.17 02-Aug-2005  rpaulo Fix typos found by Giorgos Keramid and Steve Kargl on freebsd-arch mailing
list. They were found on libc x86_64 MD code, but I noticed that they are
present on i386 too.
 1.16 09-Feb-2005  christos Bring back the head versions. Apparently the problem is a pkgsrc issue
unrelated to strings.
 1.15 07-Feb-2005  christos Revert everything to 2005-02-03 until the code is properly tested. Building
kde3 breaks with the head code.
 1.14 04-Feb-2005  drochner switch to J.T.Conklin's optimized str* functions
(submitted per PR i386/25263)
 1.13 26-Jul-2003  salo netbsd.org->NetBSD.org
 1.12 23-Aug-1999  kleink Use _ALIGN_TEXT from <machine/asm.h>.
 1.11 28-Apr-1995  jtc $Id: $ -> $NetBSD: $
 1.10 28-Apr-1995  jtc Winning Strategies has placed this code into the Public Domain
 1.9 12-Mar-1994  jtc Use RCSID macro for RCS ID's.
 1.8 14-Feb-1994  mycroft Style police. Use `je' and `jne' only on the result of an equality test;
use `jz' and `jnz' in all other cases.
 1.7 14-Feb-1994  jtc Fix spelling mistake: cashe -> cache.
 1.6 07-Feb-1994  jtc Use movzbl, not movsbl, to zero extend for unsigned comparison.
Fix from Bruce Evans.
 1.5 28-Jan-1994  jtc Fix spelling error in Copyright notice
 1.4 21-Oct-1993  jtc So many files in arch/i386 have been changed I might as well run my
remove unecessary trailing whitespace script.
 1.3 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.2 08-Oct-1993  jtc Use "testb %cl,%cl" instead of "cmpb $0,%cl".
This saves three cycles per character, and reduces the size of the
function by eight bytes (the loop is unrolled eight times).
Thanks to davidg for pointing this out.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.5 01-Mar-1995  mycroft Clean up deleted files.
 1.4 21-Oct-1993  jtc So many files in arch/i386 have been changed I might as well run my
remove unecessary trailing whitespace script.
 1.3 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.2 08-Oct-1993  jtc Use "testb %cl,%cl" instead of "cmpb $0,%cl".
This saves three cycles per character, and reduces the size of the
function by eight bytes (the loop is unrolled eight times).
Thanks to davidg for pointing this out.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.12 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 1.11 15-Mar-2005  christos New strcpy.S from jtc. This should have been committed together with the
rest of the string changes before.
 1.10 26-Jul-2003  salo netbsd.org->NetBSD.org
 1.9 23-Aug-1999  kleink Use _ALIGN_TEXT from <machine/asm.h>.
 1.8 28-Apr-1995  jtc $Id: $ -> $NetBSD: $
 1.7 28-Apr-1995  jtc Winning Strategies has placed this code into the Public Domain
 1.6 12-Mar-1994  jtc Use RCSID macro for RCS ID's.
 1.5 14-Feb-1994  mycroft Style police. Use `je' and `jne' only on the result of an equality test;
use `jz' and `jnz' in all other cases.
 1.4 14-Feb-1994  jtc Fix spelling mistake: cashe -> cache.
 1.3 28-Jan-1994  jtc Fix spelling error in Copyright notice
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.3 01-Mar-1995  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.12 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 1.11 02-Aug-2005  rpaulo Fix typos found by Giorgos Keramid and Steve Kargl on freebsd-arch mailing
list. They were found on libc x86_64 MD code, but I noticed that they are
present on i386 too.
 1.10 09-Feb-2005  christos Bring back the head versions. Apparently the problem is a pkgsrc issue
unrelated to strings.
 1.9 07-Feb-2005  christos Revert everything to 2005-02-03 until the code is properly tested. Building
kde3 breaks with the head code.
 1.8 04-Feb-2005  drochner switch to J.T.Conklin's optimized str* functions
(submitted per PR i386/25263)
 1.7 26-Jul-2003  salo netbsd.org->NetBSD.org
 1.6 28-Apr-1995  jtc $Id: $ -> $NetBSD: $
 1.5 28-Apr-1995  jtc Winning Strategies has placed this code into the Public Domain
 1.4 12-Mar-1994  jtc Use RCSID macro for RCS ID's.
 1.3 28-Jan-1994  jtc Fix spelling error in Copyright notice
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.3 01-Mar-1995  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.15 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.14 03-Aug-2005  rpaulo branches: 1.14.50; 1.14.62;
Fix another typo in comments found by Ricardo Nabinger Sanchez
on the freebsd-arch mailing list.
 1.13 26-Jul-2003  salo netbsd.org->NetBSD.org
 1.12 23-Aug-1999  kleink Use _ALIGN_TEXT from <machine/asm.h>.
 1.11 28-Apr-1995  jtc $Id: $ -> $NetBSD: $
 1.10 28-Apr-1995  jtc Winning Strategies has placed this code into the Public Domain
 1.9 12-Mar-1994  jtc Use RCSID macro for RCS ID's.
 1.8 14-Feb-1994  mycroft Style police. Use `je' and `jne' only on the result of an equality test;
use `jz' and `jnz' in all other cases.
 1.7 14-Feb-1994  jtc Performance improvement from Bruce Evans.
Removes one test instruction for each character.
 1.6 07-Feb-1994  jtc Use movzbl, not movsbl, to zero extend for unsigned comparison.
Fix from Bruce Evans.
 1.5 28-Jan-1994  jtc Fix spelling error in Copyright notice
 1.4 21-Oct-1993  jtc So many files in arch/i386 have been changed I might as well run my
remove unecessary trailing whitespace script.
 1.3 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.2 08-Oct-1993  jtc Use "testb %cl,%cl" instead of "cmpb $0,%cl".
This saves three cycles per character, and reduces the size of the
function by eight bytes (the loop is unrolled eight times).
Thanks to davidg for pointing this out.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.14.62.1 10-Aug-2014  tls Rebase.
 1.14.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5 01-Mar-1995  mycroft Clean up deleted files.
 1.4 21-Oct-1993  jtc So many files in arch/i386 have been changed I might as well run my
remove unecessary trailing whitespace script.
 1.3 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.2 08-Oct-1993  jtc Use "testb %cl,%cl" instead of "cmpb $0,%cl".
This saves three cycles per character, and reduces the size of the
function by eight bytes (the loop is unrolled eight times).
Thanks to davidg for pointing this out.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.10 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 1.9 09-Feb-2005  christos Bring back the head versions. Apparently the problem is a pkgsrc issue
unrelated to strings.
 1.8 07-Feb-2005  christos Revert everything to 2005-02-03 until the code is properly tested. Building
kde3 breaks with the head code.
 1.7 06-Feb-2005  christos PR/29248: Geoff C. Wing: memchr broken after latest commit.
Apply fix submitted by jtc: The problem was that his regression tests
never checked for characters with the high bit set. Change movl to movzbl
where it was not done yet. In addition strrchr.S missed a jump to Lzero.
 1.6 04-Feb-2005  drochner switch to J.T.Conklin's optimized str* functions
(submitted per PR i386/25263)
 1.5 09-Jan-1998  perry RCS Id Police.
 1.4 08-Dec-1993  jtc No reason these can't share code...
 1.3 21-Oct-1993  jtc So many files in arch/i386 have been changed I might as well run my
remove unecessary trailing whitespace script.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.4 01-Mar-1995  mycroft Clean up deleted files.
 1.3 21-Oct-1993  jtc So many files in arch/i386 have been changed I might as well run my
remove unecessary trailing whitespace script.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.14 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.13 12-Nov-2007  ad branches: 1.13.36; 1.13.48;
Don't unconditionally clear the direction flag. The ABI says it must always
be clear when making a function call, and 'cld' takes about 50 clock cyles
on the P4.
 1.12 02-Aug-2005  rpaulo branches: 1.12.10;
Fix typos found by Giorgos Keramid and Steve Kargl on freebsd-arch mailing
list. They were found on libc x86_64 MD code, but I noticed that they are
present on i386 too.
 1.11 26-Jul-2003  salo netbsd.org->NetBSD.org
 1.10 23-Aug-1999  kleink Use _ALIGN_TEXT from <machine/asm.h>.
 1.9 28-Apr-1995  jtc $Id: $ -> $NetBSD: $
 1.8 28-Apr-1995  jtc Winning Strategies has placed this code into the Public Domain
 1.7 12-Mar-1994  jtc Use RCSID macro for RCS ID's.
 1.6 14-Feb-1994  jtc Use "ror $8,%ax" instead of "xchg %al,%ah": equal on a i386, 1 cycle faster
on a i486, and 2 cycles faster on a iPentium.
 1.5 28-Jan-1994  jtc Fix spelling error in Copyright notice
 1.4 25-Nov-1993  jtc Remove special case for len == 0 --- It wasn't needed. By dropping the
conditional, the general case (where we are actually swapping bytes) is
a tiny bit faster.
 1.3 21-Oct-1993  jtc So many files in arch/i386 have been changed I might as well run my
remove unecessary trailing whitespace script.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.12.10.1 09-Jan-2008  matt sync with HEAD
 1.13.48.1 10-Aug-2014  tls Rebase.
 1.13.36.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5 01-Mar-1995  mycroft Clean up deleted files.
 1.4 25-Nov-1993  jtc Remove special case for len == 0 --- It wasn't needed. By dropping the
conditional, the general case (where we are actually swapping bytes) is
a tiny bit faster.
 1.3 21-Oct-1993  jtc So many files in arch/i386 have been changed I might as well run my
remove unecessary trailing whitespace script.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.17 13-Sep-2005  christos compat core reorg.
 1.16 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.15 20-Mar-2002  ross use canonical indirect jmp & call syntax to squelch new as(1) warning
 1.14 08-Dec-2000  mycroft branches: 1.14.2;
Use the SYSTRAP() macro more uniformly.
 1.13 03-Apr-2000  mycroft Clean up.
* _REENTRANT is always defined.
* The vfork() stubs can use cerror.
 1.12 02-Dec-1998  thorpej Warn about references to the compatibility vfork() (i.e. the vfork() with
the 4.4BSD non-shared-address-space semantics), and direct the user to
include <unistd.h> to generate the correct reference.

This warning isn't about an ABI compatibility issue, but the new vfork() is
considerably faster.
 1.11 01-Oct-1998  kleink Add *__errno() redirection for _REENTRANT code.
 1.10 01-Jul-1998  thorpej Use _C_LABEL() to generate C labels.
 1.9 16-Jul-1997  christos RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in
<machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS
define not LIBC_SCCS
 1.8 26-Oct-1994  mycroft Use trap gate to enter kernel.
 1.7 27-Jan-1994  mycroft Trivial speedup inspired by SPARC code.
 1.6 27-Jan-1994  mycroft Random cleanup.
 1.5 27-Jan-1994  mycroft Stylistic changes.
 1.4 24-Jan-1994  jtc Optimization tweaks:
Use testl %reg,%reg instead of cmpl $0,%reg
Use xorl %reg,%reg instead of movl $0,%reg
 1.3 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.2 21-Oct-1993  jtc So many files in arch/i386 have been changed I might as well run my
remove unecessary trailing whitespace script.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.14.2.1 22-Mar-2002  nathanw Catch up to -current.
 1.4 04-Dec-1993  mycroft Clean up deleted files.
 1.3 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.2 21-Oct-1993  jtc So many files in arch/i386 have been changed I might as well run my
remove unecessary trailing whitespace script.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.7 03-May-2025  riastradh libc/i386: Omit needless __PIC__ conditionals.

No binary change.

PR lib/59391: unnecessary __PIC__ conditionals clutter .S files
 1.6 23-May-2014  uebayasi branches: 1.6.36;
Put missing END() markers to set ELF symbol size.
 1.5 12-Sep-2013  joerg branches: 1.5.2;
Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
 1.4 18-Nov-2011  joerg branches: 1.4.6;
Mark __cerror as hidden and exploit that to simplify assembler.
 1.3 18-Jul-2001  fvdl branches: 1.3.2; 1.3.60;
Fix call to _exit.
 1.2 17-Jul-2001  thorpej Simplify slightly.
 1.1 17-Jul-2001  fvdl __clone stub for i386
 1.3.60.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.60.1 17-Apr-2012  yamt sync with head
 1.3.2.2 08-Oct-2001  nathanw Catch up to -current.
 1.3.2.1 18-Jul-2001  nathanw file __clone.S was added on branch nathanw_sa on 2001-10-08 20:17:37 +0000
 1.4.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.2.1 10-Aug-2014  tls Rebase.
 1.6.36.1 02-Aug-2025  perseant Sync with HEAD
 1.2 13-Sep-2005  christos compat core reorg.
 1.1 25-Aug-1999  thorpej Add __msgctl13(), __semctl13(), and __shmctl13() (symbols are __RENAME()'d
in their respective header files). Add PSEUDO stubs for the old versions
of these system calls.

Note that __semctl13() doesn't require the extra stub that the old
semctl()/__semctl() did, as the SUSv2 version takes variable arguments,
and thus does not require the extra indirection.
 1.13 26-Oct-2021  christos Merge all MD __sigaction14_sigtramp.c copies into one:
- sparc and sparc64 were not using version 0 sigcontext when there were
no arguments in the signal version. This was probably a bug.
- vax is using +1 the version numbers of the other archs.
- Only hppa was defining __LIBC12_SOURCE__ so it was getting a working
sigcontext before. all the other ports that supported sigcontext had
the compat code disabled.
[pointed out by thorpej, thanks!]
If we want to remove sigcontext support from userland at least now there
is less work to do so.
 1.12 28-Apr-2008  martin branches: 1.12.8;
Remove clause 3 and 4 from TNF licenses
 1.11 19-Feb-2006  christos branches: 1.11.18;
make these consistent.
 1.10 13-Sep-2005  christos compat core reorg.
 1.9 12-Jun-2005  lukem Add missing __RCSID()
 1.8 23-Mar-2004  drochner 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
 1.7 12-Oct-2003  christos use matt's powerpc implementation. It is simpler than mine, and it does
matter as far as performance goes.
 1.6 12-Sep-2003  christos - don't define __LIBC12_SOURCE__
- need to SIG_IGN SIGSYS for the version check
- simplify code
 1.5 11-Sep-2003  christos No reason for __ in static variable.
 1.4 11-Sep-2003  christos For kernels that have COMPAT_16 enabled, detect that and use the old
sigcontext trampoline code when SA_SIGINFO is not set.
 1.3 06-Sep-2003  christos siginfo signal trampoline code.
 1.2 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.1 09-Jul-2002  thorpej branches: 1.1.2;
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.
 1.1.2.3 02-Oct-2002  thorpej libc:
Internally rename __sigaction14 to __libc_sigaction14. Provide a
weak alias of __sigaction14 -> __libc_sigaction14.

libpthread:
Use __libc_sigaction14 to actually register the signal handler, rather
than using __sigaction_sigtramp() directly with a hard-coded trampoline
version. While we don't actually use the libc trampoline, we want to
avoid depending on any COMPAT_* kernel options down the road (this is
already the case for the VAX port).

Be explicit about which version of the signal interface we're interposing
(...14), and build pthread_sig.c with __LIBC12_SOURCE__ (required to get
the libc-internal interfaces).
 1.1.2.2 01-Aug-2002  nathanw Catch up to -current.
 1.1.2.1 09-Jul-2002  nathanw file __sigaction14_sigtramp.c was added on branch nathanw_sa on 2002-08-01 03:27:56 +0000
 1.11.18.1 18-May-2008  yamt sync with head.
 1.12.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.12.8.1 28-Apr-2008  martin file __sigaction14_sigtramp.c was added on branch christos-time_t on 2008-04-28 20:22:57 +0000
 1.8 13-Sep-2005  christos compat core reorg.
 1.7 26-Mar-2004  drochner no need to define __HAVE_SIGINFO anymore
 1.6 12-Sep-2003  christos need __HAVE_SIGINFO to get the right flavor of the sigreturn symbol.
 1.5 12-Sep-2003  christos __sigreturn14 -> compat_16___sigreturn14; thanks yamt
 1.4 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.3 28-Sep-1999  kleink Oops, missed these in the mcount -> __mcount renaming.
 1.2 23-Aug-1999  kleink branches: 1.2.2;
Use _ALIGN_TEXT from <machine/asm.h>.
 1.1 26-Sep-1998  christos Fix signal mess. Change old syscalls to use the right signal numbers
and add a versioned copy of sigreturn (from Jason)
 1.2.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.5 13-Sep-2005  christos compat core reorg.
 1.4 26-Mar-2004  drochner no need to define __HAVE_SIGINFO anymore
 1.3 12-Sep-2003  christos need __HAVE_SIGINFO to get the right flavor of the sigreturn symbol.
 1.2 12-Sep-2003  christos __sigreturn14 -> compat_16___sigreturn14; thanks yamt
 1.1 09-Jul-2002  thorpej branches: 1.1.2;
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.
 1.1.2.2 01-Aug-2002  nathanw Catch up to -current.
 1.1.2.1 09-Jul-2002  nathanw file __sigtramp1.S was added on branch nathanw_sa on 2002-08-01 03:27:57 +0000
 1.7 19-Oct-2020  kamil Restore ESP from mcontext

Improves unwinding of multiple frames without base pointer.
 1.6 12-Oct-2020  kamil Decorate the i386 signal trampoline with CFI attributes easing unwinding

Now, the unwinders (in backtrace(3) and similar) can unwind properly
the stack from a signal handler.
 1.5 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.4 28-Apr-2008  martin branches: 1.4.8; 1.4.28; 1.4.40;
Remove clause 3 and 4 from TNF licenses
 1.3 08-Nov-2006  drochner branches: 1.3.16;
if setcontext(2) returns, _exit(2) with a return code of -1 instead
of relying on a sensible return value
 1.2 02-Aug-2006  jld Fix PR 34112, where a program could mysteriously exit on return from a
signal handler, by deriving the context pointer from the stack pointer
instead of trying to read it from where the sigaction function may have
overwritten it with arbitrary bits.

Fix provided by Matthias Drochner in the PR.
 1.1 06-Sep-2003  christos branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.10;
siginfo signal trampoline code.
 1.1.10.1 03-Aug-2006  tron Pull up following revision(s) (requested by jld in ticket #1447):
lib/libc/arch/i386/sys/__sigtramp2.S: revision 1.2
Fix PR 34112, where a program could mysteriously exit on return from a
signal handler, by deriving the context pointer from the stack pointer
instead of trying to read it from where the sigaction function may have
overwritten it with arbitrary bits.
Fix provided by Matthias Drochner in the PR.
 1.1.8.1 11-Aug-2006  riz Pull up following revision(s) (requested by jld in ticket #10667):
lib/libc/arch/i386/sys/__sigtramp2.S: revision 1.2
Fix PR 34112, where a program could mysteriously exit on return from a
signal handler, by deriving the context pointer from the stack pointer
instead of trying to read it from where the sigaction function may have
overwritten it with arbitrary bits.
Fix provided by Matthias Drochner in the PR.
 1.1.6.1 03-Aug-2006  tron Pull up following revision(s) (requested by jld in ticket #1447):
lib/libc/arch/i386/sys/__sigtramp2.S: revision 1.2
Fix PR 34112, where a program could mysteriously exit on return from a
signal handler, by deriving the context pointer from the stack pointer
instead of trying to read it from where the sigaction function may have
overwritten it with arbitrary bits.
Fix provided by Matthias Drochner in the PR.
 1.1.4.1 11-Aug-2006  riz Pull up following revision(s) (requested by jld in ticket #10667):
lib/libc/arch/i386/sys/__sigtramp2.S: revision 1.2
Fix PR 34112, where a program could mysteriously exit on return from a
signal handler, by deriving the context pointer from the stack pointer
instead of trying to read it from where the sigaction function may have
overwritten it with arbitrary bits.
Fix provided by Matthias Drochner in the PR.
 1.1.2.1 11-Aug-2006  riz Pull up following revision(s) (requested by jld in ticket #10667):
lib/libc/arch/i386/sys/__sigtramp2.S: revision 1.2
Fix PR 34112, where a program could mysteriously exit on return from a
signal handler, by deriving the context pointer from the stack pointer
instead of trying to read it from where the sigaction function may have
overwritten it with arbitrary bits.
Fix provided by Matthias Drochner in the PR.
 1.3.16.1 18-May-2008  yamt sync with head.
 1.4.40.1 10-Aug-2014  tls Rebase.
 1.4.28.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.4.8.1 28-Apr-2008  martin file __sigtramp2.S was added on branch christos-time_t on 2008-04-28 20:22:57 +0000
 1.5 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.4 18-Nov-2011  joerg branches: 1.4.6; 1.4.16;
Mark __cerror as hidden and exploit that to simplify assembler.
 1.3 07-Aug-2003  agc branches: 1.3.56;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.2 20-Mar-2002  ross use canonical indirect jmp & call syntax to squelch new as(1) warning
 1.1 10-Dec-2000  mycroft branches: 1.1.2;
Handle __syscall() in user-level code for i386.
 1.1.2.1 22-Mar-2002  nathanw Catch up to -current.
 1.3.56.1 17-Apr-2012  yamt sync with head
 1.4.16.1 10-Aug-2014  tls Rebase.
 1.4.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.10 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.9 18-Nov-2011  joerg branches: 1.9.6; 1.9.16;
Mark __cerror as hidden and exploit that to simplify assembler.
 1.8 09-Mar-2007  ad branches: 1.8.36;
If I686_LIBC is defined, make syscalls using the 'sysenter' instruction.
 1.7 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.6 20-Mar-2002  ross use canonical indirect jmp & call syntax to squelch new as(1) warning
 1.5 08-Dec-2000  mycroft branches: 1.5.2;
Use the SYSTRAP() macro more uniformly.
 1.4 03-Apr-2000  mycroft Clean up.
* _REENTRANT is always defined.
* The vfork() stubs can use cerror.
 1.3 01-Oct-1998  kleink Add *__errno() redirection for _REENTRANT code.
 1.2 01-Jul-1998  thorpej Use _C_LABEL() to generate C labels.
 1.1 04-Jan-1998  thorpej Add syscall stubs for __vfork14(). These are basically copies of Ovfork.S
with the syscall numbers changed.

Since 4.4BSD vfork(2) did not share address space, Ovfork.S could be changed
to be identical to fork.S (modulo syscall numbers). __vfork14.S, however,
needs to remain separate since with a shared address space, the stub needs to
pre-decrement the stack and do an indirect jump to the return address, so that
the shared stackframe is still there when the parent returns. (Obviously,
this does not apply to systems which to not build stackframes on leaf calls.)
 1.5.2.1 22-Mar-2002  nathanw Catch up to -current.
 1.8.36.1 17-Apr-2012  yamt sync with head
 1.9.16.1 10-Aug-2014  tls Rebase.
 1.9.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.24 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.23 12-Sep-2013  joerg branches: 1.23.2;
Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
 1.22 18-Nov-2011  joerg branches: 1.22.6;
Mark __cerror as hidden and exploit that to simplify assembler.
 1.21 09-Mar-2007  ad branches: 1.21.36;
If I686_LIBC is defined, make syscalls using the 'sysenter' instruction.
 1.20 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.19 20-Mar-2002  ross use canonical indirect jmp & call syntax to squelch new as(1) warning
 1.18 06-May-2001  ross I have no idea why this syscall wrapper does some very un-unix-like
argument prefrobbing, in particular, it computes max(addr, __minbrk)
and uses that. The code is like this even in the ancient libc/i386 tree,
back to the earliest rev 1.2. I did not see it Lite 1, but I'm not totally
sure what the random site I found was serving up.
*
* However, I do know that it should use jb and not jl.
*
 1.17 08-Dec-2000  mycroft branches: 1.17.2;
Use the SYSTRAP() macro more uniformly.
 1.16 26-Jun-2000  kleink Thinko in previous: we do always use an internal name.
 1.15 23-Jun-2000  kleink Add internal names for brk() and sbrk().
 1.14 03-Apr-2000  mycroft branches: 1.14.4;
Clean up.
* _REENTRANT is always defined.
* The vfork() stubs can use cerror.
 1.13 03-Apr-2000  mycroft Repair syscall stubs that were not updated when the cerror interface was
modified.
 1.12 08-Feb-1999  christos branches: 1.12.2;
Amend for the PLT fixes, things broke last night with the changes to SYS.h
and cerror.S. In particular, the syscalls in the files committed below were
broken.
 1.11 14-Jan-1999  kleink * On architectures using ELF, and conditionally on those in transition, rename
_ASM_LABEL(cerror) and _ASM_LABEL(curbrk) to _C_LABEL(__cerror) and
_C_LABEL(__curbrk) (or their respective architecture-specific equivalents) to
avoid possible name clashes with identifiers used in user applications.
* Do the same for minbrk on all architectures to avoid a GCC-specific (and
on ELF architectures effectively useless) symbol reference renaming in MI code.
 1.10 16-Jul-1997  christos RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in
<machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS
define not LIBC_SCCS
 1.9 26-Oct-1994  mycroft Use trap gate to enter kernel.
 1.8 27-Jan-1994  mycroft Separate curbrk and mincrk.
 1.7 27-Jan-1994  mycroft Random cleanup.
 1.6 27-Jan-1994  mycroft SYS_brk --> SYS_break. Where's my axe?
 1.5 27-Jan-1994  mycroft More stylistic changes.
 1.4 24-Jan-1994  jtc Optimization tweaks:
Use testl %reg,%reg instead of cmpl $0,%reg
Use xorl %reg,%reg instead of movl $0,%reg
 1.3 06-Dec-1993  pk Use PIC_PLT for error returns.
Correct operand order in accessing `minbrk' and `curbrk'.
 1.2 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.12.2.1 05-May-2000  he Pull up revision 1.13 (requested by assar):
Repair syscall stubs which were not adapted when the cerror
interface was changed.
 1.14.4.1 21-Aug-2000  kleink Pull up revs. 1.15-1.16 (approved by thorpej):
Add internal names for brk(), sbrk() and fork().
 1.17.2.2 22-Mar-2002  nathanw Catch up to -current.
 1.17.2.1 08-Oct-2001  nathanw Catch up to -current.
 1.21.36.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.21.36.1 17-Apr-2012  yamt sync with head
 1.22.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.23.2.1 10-Aug-2014  tls Rebase.
 1.3 04-Dec-1993  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.19 03-May-2025  riastradh libc/i386: Omit needless __PIC__ conditionals.

No binary change.

PR lib/59391: unnecessary __PIC__ conditionals clutter .S files
 1.18 23-May-2014  uebayasi branches: 1.18.36;
Put missing END() markers to set ELF symbol size.
 1.17 12-Sep-2013  joerg branches: 1.17.2;
Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
 1.16 27-Feb-2012  joerg branches: 1.16.2;
Make __cerror protected to restore ABI leak in older libc versions,
where e.g. librt referenced the copy from libc. This still allows libc
to use PC-relative jumps.
 1.15 18-Nov-2011  joerg branches: 1.15.2;
Mark __cerror as hidden and exploit that to simplify assembler.
 1.14 07-Aug-2003  agc branches: 1.14.56;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.13 03-Apr-2000  mycroft Clean up.
 1.12 19-Feb-2000  mycroft A better fix for the stub-in-other-module problem:
Load the address of cerror through the GOT, so we can do a PIC_EPILOGUE and
leave the stack clean.
 1.11 23-Jan-2000  mycroft Make cerror() work correctly for stubs in other shlibs -- e.g. libposix.
 1.10 07-Feb-1999  christos branches: 1.10.2;
Make cerror an entry and compensate for the PIC_PROLOGUE change in SYS.h
 1.9 14-Jan-1999  kleink * On architectures using ELF, and conditionally on those in transition, rename
_ASM_LABEL(cerror) and _ASM_LABEL(curbrk) to _C_LABEL(__cerror) and
_C_LABEL(__curbrk) (or their respective architecture-specific equivalents) to
avoid possible name clashes with identifiers used in user applications.
* Do the same for minbrk on all architectures to avoid a GCC-specific (and
on ELF architectures effectively useless) symbol reference renaming in MI code.
 1.8 01-Oct-1998  kleink (Fortunately harmless) typo in previous.
 1.7 01-Oct-1998  kleink Add *__errno() redirection for _REENTRANT code.
 1.6 01-Jul-1998  thorpej Use _C_LABEL() to generate C labels.
 1.5 16-Jul-1997  christos RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in
<machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS
define not LIBC_SCCS
 1.4 02-Apr-1994  cgd have cerror DTRT on returns, w.r.t. quads and -1. it needs to be done
here (think of syscall(SYS_lseek,...)). also, kill bogus lseek thang.
 1.3 27-Jan-1994  mycroft Random cleanup.
 1.2 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.10.2.2 22-Feb-2000  he Pull up revision 1.12 (requested by mycroft):
Implement a better fix for the ``stubs in other shlibs'' problem.
With this fix the stack is left clean during the transition from
the stub to cerror().
 1.10.2.1 31-Jan-2000  he Pull up revision 1.11 (requested by mycroft):
Make cerror() work correctly for stubs in other shlibs -- e.g.
libposix.
 1.14.56.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.14.56.1 17-Apr-2012  yamt sync with head
 1.15.2.1 27-Feb-2012  riz Pull up following revision(s) (requested by joerg in ticket #57):
lib/libc/arch/arm/sys/cerror.S: revision 1.8
lib/libc/arch/vax/SYS.h: revision 1.12
lib/libc/arch/powerpc64/sys/cerror.S: revision 1.3
lib/libc/arch/powerpc64/sys/cerror.S: revision 1.4
lib/libc/arch/i386/sys/cerror.S: revision 1.16
lib/libc/arch/x86_64/sys/cerror.S: revision 1.5
lib/libc/arch/powerpc/sys/cerror.S: revision 1.10
lib/libc/arch/mips/sys/cerror.S: revision 1.17
lib/libc/arch/powerpc/sys/cerror.S: revision 1.9
Make __cerror protected to restore ABI leak in older libc versions,
where e.g. librt referenced the copy from libc. This still allows libc
to use PC-relative jumps.
PowerPC doesn't have CERROR since it never had a.out.
Use _C_LABEL(__cerror) instead.
 1.16.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.17.2.1 10-Aug-2014  tls Rebase.
 1.18.36.1 02-Aug-2025  perseant Sync with HEAD
 1.3 04-Dec-1993  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.16 07-Feb-2017  kamil Mark exect(3) obsolete and bind it to plain execve(2) on all platforms

The original exect(2) from BSD4.2 was enabling bit for tracing
(single-step mode) and calling execve(2). The purpose of it was to generate
a signal for a tracer once the application will change its image to a new
program.

This approach no longer works as:
- exect(2) traces (single-steps) libc and it requires hundreds or
thousands steps before entering a new image
- it's vax and x86 specific code
- this functionality has been moved to the kernel - once a process is
traced it will generate SIGTRAP with si_code TRAP_EXEC and route it to
its debugger
- the side effects and unportability make this interface unusable
- there are no known users of this interface
- it apparently never worked better since day0 of NetBSD ("day0 bug")

Users are requested to move to other execve(2) variants. Calling current
execve(2) as it is the most similar behavior to this one from BSD4.2.

Discussed several times on mailing lists and in PR/51700.

Add warning to exect(3) telling about marking this function obsolete.

This function is prepared to be removed in next libc major bump.

Sponsored by <The NetBSD Foundation>
 1.15 23-May-2014  uebayasi branches: 1.15.6; 1.15.10;
Put missing END() markers to set ELF symbol size.
 1.14 18-Nov-2011  joerg branches: 1.14.6; 1.14.16;
Mark __cerror as hidden and exploit that to simplify assembler.
 1.13 07-Aug-2003  agc branches: 1.13.56;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.12 20-Mar-2002  ross use canonical indirect jmp & call syntax to squelch new as(1) warning
 1.11 08-Dec-2000  mycroft branches: 1.11.2;
Use the SYSTRAP() macro more uniformly.
 1.10 03-Apr-2000  mycroft Repair syscall stubs that were not updated when the cerror interface was
modified.
 1.9 08-Feb-1999  christos branches: 1.9.2;
Amend for the PLT fixes, things broke last night with the changes to SYS.h
and cerror.S. In particular, the syscalls in the files committed below were
broken.
 1.8 14-Jan-1999  kleink * On architectures using ELF, and conditionally on those in transition, rename
_ASM_LABEL(cerror) and _ASM_LABEL(curbrk) to _C_LABEL(__cerror) and
_C_LABEL(__curbrk) (or their respective architecture-specific equivalents) to
avoid possible name clashes with identifiers used in user applications.
* Do the same for minbrk on all architectures to avoid a GCC-specific (and
on ELF architectures effectively useless) symbol reference renaming in MI code.
 1.7 16-Jul-1997  christos RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in
<machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS
define not LIBC_SCCS
 1.6 26-Oct-1994  mycroft Use trap gate to enter kernel.
 1.5 27-Jan-1994  mycroft Random cleanup.
 1.4 27-Jan-1994  mycroft More stylistic changes.
 1.3 06-Dec-1993  pk Use PIC_PLT for error returns.
Correct operand order in accessing `minbrk' and `curbrk'.
 1.2 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.9.2.1 05-May-2000  he Pull up revision 1.10 (requested by assar):
Repair syscall stubs which were not adapted when the cerror
interface was changed.
 1.11.2.1 22-Mar-2002  nathanw Catch up to -current.
 1.13.56.1 17-Apr-2012  yamt sync with head
 1.14.16.1 10-Aug-2014  tls Rebase.
 1.14.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.15.10.1 21-Apr-2017  bouyer Sync with HEAD
 1.15.6.1 20-Mar-2017  pgoyette Sync with HEAD
 1.3 04-Dec-1993  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.10 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.9 07-Aug-2003  agc branches: 1.9.62; 1.9.74;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.8 13-Feb-2003  nathanw Implement pthread_atfork() (in libc, because the required threadlib
stub behavior is exactly the same as the usual behavior).
 1.7 26-Jun-2000  kleink Need an internal name for fork().
 1.6 16-Jul-1997  christos branches: 1.6.12;
RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in
<machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS
define not LIBC_SCCS
 1.5 27-Jan-1994  mycroft Trivial speedup inspired by SPARC code.
 1.4 27-Jan-1994  mycroft Stylistic changes.
 1.3 24-Jan-1994  jtc Optimization tweaks:
Use testl %reg,%reg instead of cmpl $0,%reg
Use xorl %reg,%reg instead of movl $0,%reg
 1.2 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.6.12.1 21-Aug-2000  kleink Pull up rev. 1.7 (approved by thorpej):
Add internal names for brk(), sbrk() and fork().
 1.9.74.1 10-Aug-2014  tls Rebase.
 1.9.62.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3 04-Dec-1993  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.4 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.3 28-Apr-2008  martin branches: 1.3.8; 1.3.28; 1.3.40;
Remove clause 3 and 4 from TNF licenses
 1.2 18-Jan-2003  thorpej branches: 1.2.30;
Merge the nathanw_sa branch.
 1.1 05-Mar-2001  nathanw branches: 1.1.2;
file getcontext.S was initially added on branch nathanw_sa.
 1.1.2.1 05-Mar-2001  nathanw User-level support for LWPs and scheduler activations.
SVR4-style ucontext code by Klaus Klein.
 1.2.30.1 18-May-2008  yamt sync with head.
 1.3.40.1 10-Aug-2014  tls Rebase.
 1.3.28.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.3.8.1 28-Apr-2008  martin file getcontext.S was added on branch christos-time_t on 2008-04-28 20:22:57 +0000
 1.2 02-Apr-1994  mycroft Clean up deleted files.
 1.1 31-Mar-1994  mycroft Need to set %edx to -1 before cerror, though perhaps we should have something
more generic for this.
 1.4 06-Oct-1994  mycroft Clean up deleted files.
 1.3 24-Jan-1994  jtc Optimization tweaks:
Use testl %reg,%reg instead of cmpl $0,%reg
Use xorl %reg,%reg instead of movl $0,%reg
 1.2 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.3 04-Dec-1993  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.2 13-Sep-2005  christos compat core reorg.
 1.1 25-Aug-1999  thorpej Add __msgctl13(), __semctl13(), and __shmctl13() (symbols are __RENAME()'d
in their respective header files). Add PSEUDO stubs for the old versions
of these system calls.

Note that __semctl13() doesn't require the extra stub that the old
semctl()/__semctl() did, as the SUSv2 version takes variable arguments,
and thus does not require the extra indirection.
 1.7 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.6 07-Aug-2003  agc branches: 1.6.62; 1.6.74;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.5 28-Sep-2000  kleink Need an internal name for pipe(2).
 1.4 16-Jul-1997  christos branches: 1.4.12;
RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in
<machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS
define not LIBC_SCCS
 1.3 24-Jan-1994  jtc Optimization tweaks:
Use testl %reg,%reg instead of cmpl $0,%reg
Use xorl %reg,%reg instead of movl $0,%reg
 1.2 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.4.12.1 29-Sep-2000  kleink Pull up rev. 1.5 (approved by thorpej):
Add internal name for pipe().
 1.6.74.1 10-Aug-2014  tls Rebase.
 1.6.62.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3 04-Dec-1993  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.20 03-May-2025  riastradh libc/i386: Omit needless __PIC__ conditionals.

No binary change.

PR lib/59391: unnecessary __PIC__ conditionals clutter .S files
 1.19 23-May-2014  uebayasi branches: 1.19.36;
Put missing END() markers to set ELF symbol size.
 1.18 12-Sep-2013  joerg branches: 1.18.2;
Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
 1.17 18-Nov-2011  joerg branches: 1.17.6;
Mark __cerror as hidden and exploit that to simplify assembler.
 1.16 07-Aug-2003  agc branches: 1.16.56;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.15 20-Mar-2002  ross use canonical indirect jmp & call syntax to squelch new as(1) warning
 1.14 08-Dec-2000  mycroft branches: 1.14.2;
Use the SYSTRAP() macro more uniformly.
 1.13 03-Apr-2000  mycroft Clean up.
* _REENTRANT is always defined.
* The vfork() stubs can use cerror.
 1.12 03-Apr-2000  mycroft Repair syscall stubs that were not updated when the cerror interface was
modified.
 1.11 08-Feb-1999  christos branches: 1.11.2;
Amend for the PLT fixes, things broke last night with the changes to SYS.h
and cerror.S. In particular, the syscalls in the files committed below were
broken.
 1.10 14-Jan-1999  kleink * On architectures using ELF, and conditionally on those in transition, rename
_ASM_LABEL(cerror) and _ASM_LABEL(curbrk) to _C_LABEL(__cerror) and
_C_LABEL(__curbrk) (or their respective architecture-specific equivalents) to
avoid possible name clashes with identifiers used in user applications.
* Do the same for minbrk on all architectures to avoid a GCC-specific (and
on ELF architectures effectively useless) symbol reference renaming in MI code.
 1.9 01-Oct-1998  kleink Add *__errno() redirection for _REENTRANT code.
 1.8 01-Jul-1998  thorpej Use _C_LABEL() to generate C labels.
 1.7 16-Jul-1997  christos RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in
<machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS
define not LIBC_SCCS
 1.6 26-Oct-1994  mycroft Use trap gate to enter kernel.
 1.5 27-Jan-1994  mycroft Random cleanup.
 1.4 27-Jan-1994  mycroft More stylistic changes.
 1.3 06-Dec-1993  pk Use PIC_PLT for error returns.
Correct operand order in accessing `minbrk' and `curbrk'.
 1.2 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.11.2.2 09-Sep-2000  he Pull up revision 1.12 (requested by he):
Update old syscall stubs to match the new cerror interface.
Fixes PR#10789.
 1.11.2.1 05-May-2000  he Pull up revision 1.13 (requested by assar):
Repair syscall stubs which were not adapted when the cerror
interface was changed.
 1.14.2.1 22-Mar-2002  nathanw Catch up to -current.
 1.16.56.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.16.56.1 17-Apr-2012  yamt sync with head
 1.17.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.18.2.1 10-Aug-2014  tls Rebase.
 1.19.36.1 02-Aug-2025  perseant Sync with HEAD
 1.3 04-Dec-1993  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.3 11-Nov-1996  mycroft Treat reboot() like a normal system call. From PR 2458.
 1.2 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.3 01-Mar-1995  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.22 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.21 12-Sep-2013  joerg branches: 1.21.2;
Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
 1.20 18-Nov-2011  joerg branches: 1.20.6;
Mark __cerror as hidden and exploit that to simplify assembler.
 1.19 02-Jul-2008  rmind branches: 1.19.2; 1.19.6;
Avoid calling a syscall when argument to sbrk(2) is zero.
OK by <ad>.
 1.18 09-Mar-2007  ad branches: 1.18.12;
If I686_LIBC is defined, make syscalls using the 'sysenter' instruction.
 1.17 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.16 20-Mar-2002  ross use canonical indirect jmp & call syntax to squelch new as(1) warning
 1.15 08-Dec-2000  mycroft branches: 1.15.2;
Use the SYSTRAP() macro more uniformly.
 1.14 26-Jun-2000  kleink Thinko in previous: we do always use an internal name.
 1.13 23-Jun-2000  kleink Add internal names for brk() and sbrk().
 1.12 03-Apr-2000  mycroft branches: 1.12.4;
Clean up.
* _REENTRANT is always defined.
* The vfork() stubs can use cerror.
 1.11 03-Apr-2000  mycroft Repair syscall stubs that were not updated when the cerror interface was
modified.
 1.10 08-Feb-1999  christos branches: 1.10.2;
Amend for the PLT fixes, things broke last night with the changes to SYS.h
and cerror.S. In particular, the syscalls in the files committed below were
broken.
 1.9 14-Jan-1999  kleink * On architectures using ELF, and conditionally on those in transition, rename
_ASM_LABEL(cerror) and _ASM_LABEL(curbrk) to _C_LABEL(__cerror) and
_C_LABEL(__curbrk) (or their respective architecture-specific equivalents) to
avoid possible name clashes with identifiers used in user applications.
* Do the same for minbrk on all architectures to avoid a GCC-specific (and
on ELF architectures effectively useless) symbol reference renaming in MI code.
 1.8 16-Jul-1997  christos RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in
<machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS
define not LIBC_SCCS
 1.7 26-Oct-1994  mycroft Use trap gate to enter kernel.
 1.6 27-Jan-1994  mycroft Separate curbrk and mincrk.
 1.5 27-Jan-1994  mycroft Random cleanup.
 1.4 27-Jan-1994  mycroft SYS_brk --> SYS_break. Where's my axe?
 1.3 27-Jan-1994  mycroft More stylistic changes.
 1.2 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.10.2.1 05-May-2000  he Pull up revision 1.11 (requested by assar):
Repair syscall stubs which were not adapted when the cerror
interface was changed.
 1.12.4.1 21-Aug-2000  kleink Pull up revs. 1.13-1.14 (approved by thorpej):
Add internal names for brk(), sbrk() and fork().
 1.15.2.1 22-Mar-2002  nathanw Catch up to -current.
 1.18.12.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.19.6.2 02-Jul-2008  rmind Avoid calling a syscall when argument to sbrk(2) is zero.
OK by <ad>.
 1.19.6.1 02-Jul-2008  rmind file sbrk.S was added on branch christos-time_t on 2008-07-02 20:07:44 +0000
 1.19.2.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.19.2.1 17-Apr-2012  yamt sync with head
 1.20.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.21.2.1 10-Aug-2014  tls Rebase.
 1.3 01-Mar-1995  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.8 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.7 01-Jul-1998  thorpej branches: 1.7.12;
Use _C_LABEL() to generate C labels.
 1.6 16-Jul-1997  christos RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in
<machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS
define not LIBC_SCCS
 1.5 27-Jan-1994  mycroft Random cleanup.
 1.4 18-Dec-1993  jtc Fix bug #24 by renaming _logname_valid to __logname_valid.
 1.3 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.7.12.1 25-Feb-2002  nathanw Move setlogin() stub to C code, and namespace-protect it.
 1.4 01-Mar-1995  mycroft Clean up deleted files.
 1.3 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.2 21-Oct-1993  jtc Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change
th LIBC_RCS, the entire source tree should be updated at once.
Remove && !defined(lint) from conditionals around rcs id's. No one is
ever going to pass a *.s file through lint.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.1 07-Jul-2000  itohy Add special treatment of shmat(2).
On m68k ELF calling standard (__SVR4_ABI__), if a function
returns a pointer, the return value should go to a0 as well as d0.
 1.2 13-Sep-2005  christos compat core reorg.
 1.1 25-Aug-1999  thorpej Add __msgctl13(), __semctl13(), and __shmctl13() (symbols are __RENAME()'d
in their respective header files). Add PSEUDO stubs for the old versions
of these system calls.

Note that __semctl13() doesn't require the extra stub that the old
semctl()/__semctl() did, as the SUSv2 version takes variable arguments,
and thus does not require the extra indirection.
 1.3 13-Sep-2005  christos compat core reorg.
 1.2 02-Dec-1998  thorpej Warn about references to the compatibility() sigaction(), sigpending(),
sigprocmask(), sigreturn(), and sigsuspend(), and direct the user to
include <signal.h> to generate the correct reference.
 1.1 26-Sep-1998  christos Add a compat sigaction.
 1.7 13-Sep-2005  christos compat core reorg.
 1.6 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.5 02-Dec-1998  thorpej Warn about references to the compatibility() sigaction(), sigpending(),
sigprocmask(), sigreturn(), and sigsuspend(), and direct the user to
include <signal.h> to generate the correct reference.
 1.4 26-Sep-1998  christos Fix signal mess. Change old syscalls to use the right signal numbers
and add a versioned copy of sigreturn (from Jason)
 1.3 16-Jul-1997  christos RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in
<machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS
define not LIBC_SCCS
 1.2 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.3 01-Mar-1995  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.18 13-Sep-2005  christos compat core reorg.
 1.17 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.16 20-Mar-2002  ross use canonical indirect jmp & call syntax to squelch new as(1) warning
 1.15 08-Dec-2000  mycroft branches: 1.15.2;
Use the SYSTRAP() macro more uniformly.
 1.14 03-Apr-2000  mycroft Repair syscall stubs that were not updated when the cerror interface was
modified.
 1.13 08-Feb-1999  christos branches: 1.13.2;
Amend for the PLT fixes, things broke last night with the changes to SYS.h
and cerror.S. In particular, the syscalls in the files committed below were
broken.
 1.12 14-Jan-1999  kleink * On architectures using ELF, and conditionally on those in transition, rename
_ASM_LABEL(cerror) and _ASM_LABEL(curbrk) to _C_LABEL(__cerror) and
_C_LABEL(__curbrk) (or their respective architecture-specific equivalents) to
avoid possible name clashes with identifiers used in user applications.
* Do the same for minbrk on all architectures to avoid a GCC-specific (and
on ELF architectures effectively useless) symbol reference renaming in MI code.
 1.11 02-Dec-1998  thorpej Warn about references to the compatibility() sigaction(), sigpending(),
sigprocmask(), sigreturn(), and sigsuspend(), and direct the user to
include <signal.h> to generate the correct reference.
 1.10 26-Sep-1998  christos Fix signal mess. Change old syscalls to use the right signal numbers
and add a versioned copy of sigreturn (from Jason)
 1.9 16-Jul-1997  christos RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in
<machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS
define not LIBC_SCCS
 1.8 26-Oct-1994  mycroft Use trap gate to enter kernel.
 1.7 27-Jan-1994  mycroft Random cleanup.
 1.6 27-Jan-1994  mycroft Stylistic changes.
 1.5 27-Jan-1994  mycroft Fix bug jtc introduced.
 1.4 24-Jan-1994  jtc Optimization tweaks:
Use testl %reg,%reg instead of cmpl $0,%reg
Use xorl %reg,%reg instead of movl $0,%reg
 1.3 06-Dec-1993  pk Use PIC_PLT for error returns.
Correct operand order in accessing `minbrk' and `curbrk'.
 1.2 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.13.2.1 05-May-2000  he Pull up revision 1.14 (requested by assar):
Repair syscall stubs which were not adapted when the cerror
interface was changed.
 1.15.2.1 22-Mar-2002  nathanw Catch up to -current.
 1.3 01-Mar-1995  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.11 13-Sep-2005  christos compat core reorg.
 1.10 26-Mar-2004  drochner the WARN_REFERENCES text "include <signal.h> for correct reference" is pointless
as <signal.h> won't help you, so remove it
 1.9 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.8 28-Sep-1999  kleink Oops, missed these in the mcount -> __mcount renaming.
 1.7 23-Aug-1999  kleink branches: 1.7.2;
Use _ALIGN_TEXT from <machine/asm.h>.
 1.6 02-Dec-1998  thorpej Warn about references to the compatibility() sigaction(), sigpending(),
sigprocmask(), sigreturn(), and sigsuspend(), and direct the user to
include <signal.h> to generate the correct reference.
 1.5 26-Sep-1998  christos Fix signal mess. Change old syscalls to use the right signal numbers
and add a versioned copy of sigreturn (from Jason)
 1.4 16-Jul-1997  christos RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in
<machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS
define not LIBC_SCCS
 1.3 30-Nov-1996  jtc PROF -> GPROF
 1.2 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.7.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.3 01-Mar-1995  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.16 13-Sep-2005  christos compat core reorg.
 1.15 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.14 20-Mar-2002  ross use canonical indirect jmp & call syntax to squelch new as(1) warning
 1.13 08-Dec-2000  mycroft branches: 1.13.2;
Use the SYSTRAP() macro more uniformly.
 1.12 03-Apr-2000  mycroft Repair syscall stubs that were not updated when the cerror interface was
modified.
 1.11 08-Feb-1999  christos branches: 1.11.2;
Amend for the PLT fixes, things broke last night with the changes to SYS.h
and cerror.S. In particular, the syscalls in the files committed below were
broken.
 1.10 14-Jan-1999  kleink * On architectures using ELF, and conditionally on those in transition, rename
_ASM_LABEL(cerror) and _ASM_LABEL(curbrk) to _C_LABEL(__cerror) and
_C_LABEL(__curbrk) (or their respective architecture-specific equivalents) to
avoid possible name clashes with identifiers used in user applications.
* Do the same for minbrk on all architectures to avoid a GCC-specific (and
on ELF architectures effectively useless) symbol reference renaming in MI code.
 1.9 02-Dec-1998  thorpej Warn about references to the compatibility() sigaction(), sigpending(),
sigprocmask(), sigreturn(), and sigsuspend(), and direct the user to
include <signal.h> to generate the correct reference.
 1.8 26-Sep-1998  christos Fix signal mess. Change old syscalls to use the right signal numbers
and add a versioned copy of sigreturn (from Jason)
 1.7 16-Jul-1997  christos RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in
<machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS
define not LIBC_SCCS
 1.6 26-Oct-1994  mycroft Use trap gate to enter kernel.
 1.5 27-Jan-1994  mycroft Random cleanup.
 1.4 27-Jan-1994  mycroft Stylistic changes.
 1.3 06-Dec-1993  pk Use PIC_PLT for error returns.
Correct operand order in accessing `minbrk' and `curbrk'.
 1.2 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.11.2.1 05-May-2000  he Pull up revision 1.12 (requested by assar):
Repair syscall stubs which were not adapted when the cerror
interface was changed.
 1.13.2.1 22-Mar-2002  nathanw Catch up to -current.
 1.3 01-Mar-1995  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.14 18-Apr-2020  thorpej Rename "syscall" to "_syscall" and provide "syscall" as a weak alias.
 1.13 23-May-2014  uebayasi branches: 1.13.24;
Put missing END() markers to set ELF symbol size.
 1.12 18-Nov-2011  joerg branches: 1.12.6; 1.12.16;
Mark __cerror as hidden and exploit that to simplify assembler.
 1.11 07-Aug-2003  agc branches: 1.11.56;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.10 20-Mar-2002  ross use canonical indirect jmp & call syntax to squelch new as(1) warning
 1.9 03-Apr-2000  mycroft branches: 1.9.6;
Repair syscall stubs that were not updated when the cerror interface was
modified.
 1.8 08-Feb-1999  christos branches: 1.8.2;
Amend for the PLT fixes, things broke last night with the changes to SYS.h
and cerror.S. In particular, the syscalls in the files committed below were
broken.
 1.7 14-Jan-1999  kleink * On architectures using ELF, and conditionally on those in transition, rename
_ASM_LABEL(cerror) and _ASM_LABEL(curbrk) to _C_LABEL(__cerror) and
_C_LABEL(__curbrk) (or their respective architecture-specific equivalents) to
avoid possible name clashes with identifiers used in user applications.
* Do the same for minbrk on all architectures to avoid a GCC-specific (and
on ELF architectures effectively useless) symbol reference renaming in MI code.
 1.6 16-Jul-1997  christos RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in
<machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS
define not LIBC_SCCS
 1.5 26-Oct-1994  mycroft Use trap gate to enter kernel.
 1.4 27-Jan-1994  mycroft Random cleanup.
 1.3 06-Dec-1993  pk Use PIC_PLT for error returns.
Correct operand order in accessing `minbrk' and `curbrk'.
 1.2 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.8.2.1 05-May-2000  he Pull up revision 1.9 (requested by assar):
Repair syscall stubs which were not adapted when the cerror
interface was changed.
 1.9.6.1 22-Mar-2002  nathanw Catch up to -current.
 1.11.56.1 17-Apr-2012  yamt sync with head
 1.12.16.1 10-Aug-2014  tls Rebase.
 1.12.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.13.24.1 21-Apr-2020  martin Sync with HEAD
 1.3 01-Mar-1995  mycroft Clean up deleted files.
 1.2 21-Oct-1993  jtc Move the old berkeley sccs id into the header comment like it is done
for other source files.
 1.1 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it

RSS XML Feed