matt
44e25a6200
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*.
2000-12-13 07:42:47 +00:00
matt
9a6a3ec1b5
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.
2000-12-13 07:14:43 +00:00
enami
44db4d16cc
KMSRCS is different from SRCS. Put __syscall.S in latter.
2000-12-13 07:05:55 +00:00
simonb
0e35eedd7e
Move __syscall.S to the arch specific Makefile.inc's where it is
...
implemented.
2000-12-12 22:38:42 +00:00
mycroft
731305d114
Handle __syscall() in user-level code for i386.
2000-12-10 21:27:37 +00:00
mycroft
10bfc7b1b3
Use the SYSTRAP() macro more uniformly.
2000-12-08 22:57:57 +00:00
kleink
82fd76bb06
Need an internal name for pipe(2).
2000-09-28 08:38:53 +00:00
msaitoh
f9b799b651
check LIBC_SCCS
2000-09-13 22:32:25 +00:00
ad
136f4e3b32
%edx is free; use it instead of %ebx.
2000-08-07 14:46:52 +00:00
itohy
af83a97717
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.
2000-07-07 08:20:50 +00:00
kleink
b8a4d7adf9
Need an internal name for fork().
2000-06-26 06:32:54 +00:00
kleink
15bc7ed349
Thinko in previous: we do always use an internal name.
2000-06-26 06:25:36 +00:00
kleink
03f996bd0c
Add internal names for brk() and sbrk().
2000-06-23 15:40:36 +00:00
mycroft
fedba1d813
Clean up.
2000-04-03 04:20:44 +00:00
mycroft
72e604e414
Clean up.
...
* _REENTRANT is always defined.
* The vfork() stubs can use cerror.
2000-04-03 04:13:36 +00:00
mycroft
7f7027bb59
Repair syscall stubs that were not updated when the cerror interface was
...
modified.
2000-04-03 03:13:07 +00:00
kleink
e4d7c2e329
Add ISO C99 long long integer general utility interfaces; partially addresses
...
PR standards/9482.
2000-03-06 18:32:22 +00:00
mycroft
d018facbbf
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.
2000-02-19 21:04:58 +00:00
mycroft
5888ab27bd
Make cerror() work correctly for stubs in other shlibs -- e.g. libposix.
2000-01-23 23:38:32 +00:00
mycroft
c26054b799
Delint.
2000-01-22 22:40:58 +00:00
kleink
11e6c54cfc
C99: Define a NAN macro in <math.h> which evaulates to a constant expression of
...
a single-precision quiet NaN; only to be defined on platforms that do support
this value.
1999-12-23 10:15:05 +00:00
kleink
30ae96c534
Oops, missed these in the mcount -> __mcount renaming.
1999-09-28 08:27:08 +00:00
drochner
ec2a7d4249
SYS.h was nuked from libkern
1999-09-10 15:41:51 +00:00
mycroft
ea4b733810
Trivial KNF.
1999-08-29 18:39:35 +00:00
mycroft
099dd01a1d
Make the C version of frexp() consitent across platforms, and handle the
...
Inf/NaN case.
1999-08-29 18:30:14 +00:00
mycroft
17030e8106
Separate isnan() into a separate module, and make isinf()/isnan() use ieee.h.
1999-08-29 18:08:27 +00:00
thorpej
30dca7f7db
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.
1999-08-25 05:09:27 +00:00
kleink
74511f97b1
Use _ALIGN_TEXT from <machine/asm.h>.
1999-08-23 08:45:09 +00:00
mycroft
2b504929fa
Just some minor cleanup.
1999-03-10 08:15:43 +00:00
mycroft
f1c544b6a8
Use ieee.h structs and macros.
1999-03-10 08:14:44 +00:00
christos
ae6215337e
Don't use 1: label; it is uses by the PIC_PROLOGUE macro and we jmp in the
...
wrong place!
1999-02-22 13:07:14 +00:00
christos
af1c8fd11a
For don't mess up the stack before calling syscall when using PIC_PROLOGUE.
1999-02-13 16:13:48 +00:00
christos
e387e174fc
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.
1999-02-08 18:56:48 +00:00
christos
143dcdbe44
Make cerror an entry and compensate for the PIC_PROLOGUE change in SYS.h
1999-02-07 17:22:25 +00:00
christos
cb41675175
Add PIC_PROLOGUE before the PLT call to cerror. ELF dynamic linking needs
...
this.
1999-02-07 17:21:38 +00:00
bouyer
dc306354b0
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.
1999-01-15 13:31:15 +00:00
kleink
6348b7d5b5
* 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.
1999-01-14 22:48:18 +00:00
thorpej
efd37a7da8
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.
1998-12-02 19:29:56 +00:00
thorpej
e644246e6a
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.
1998-12-02 01:01:03 +00:00
christos
7c990e0c7b
delint
1998-11-14 19:31:01 +00:00
kleink
d541ca6d80
Need internal names for isinf() and isnan().
1998-10-13 14:43:36 +00:00
kleink
b5fe349eff
Add *__errno() redirection for _REENTRANT code.
1998-10-01 19:25:05 +00:00
kleink
d8d9d85d13
(Fortunately harmless) typo in previous.
1998-10-01 19:20:44 +00:00
kleink
f73ad7167d
Add *__errno() redirection for _REENTRANT code.
1998-10-01 09:26:31 +00:00
christos
2e3d142a37
Add a compat sigaction.
1998-09-26 23:57:15 +00:00
christos
6bacaab8be
Fix signal mess. Change old syscalls to use the right signal numbers
...
and add a versioned copy of sigreturn (from Jason)
1998-09-26 23:49:34 +00:00
christos
ccf1e97b10
Add setjmp versioned bits (from Jason).
...
XXX: Someone needs to make setjmp/longjmp save and restore the signal stack!
1998-09-26 23:46:01 +00:00
mycroft
2142384565
Assign my copyrights to TNF.
1998-08-15 09:36:04 +00:00
perry
2cc5ae3efa
add memcmp.S to libkern.
1998-08-04 01:35:57 +00:00
perry
73e9c49b2b
add memmove.S to libkern.
1998-08-04 01:24:59 +00:00
mycroft
982e920022
const poisoning.
1998-07-26 14:13:00 +00:00
thorpej
0c3c6dabb8
Use _C_LABEL() to generate C labels.
1998-07-01 06:24:25 +00:00
thorpej
0b12e1c944
Generate C labels with _C_LABEL().
1998-07-01 01:28:48 +00:00
mycroft
cf02652abc
And rindex.S...
1998-02-22 07:21:32 +00:00
mycroft
6b7f2d0f92
And index.S...
1998-02-22 07:20:24 +00:00
mycroft
c8cf6620bb
Copy strchr.S and strrchr.S as well.
1998-02-22 07:01:11 +00:00
mycroft
96b33a9cda
Copy more files to libkern.
1998-02-22 06:37:54 +00:00
perry
a3a46419b5
RCS Id Police.
1998-01-09 03:45:03 +00:00
thorpej
bedc7b48df
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.)
1998-01-04 20:58:08 +00:00
cgd
435c105d59
lint stubs for assembly routines.
1997-11-05 23:37:06 +00:00
cgd
4d7e773266
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).
1997-11-05 22:59:37 +00:00
lukem
2a55b0f192
rcsid police
1997-10-09 10:07:40 +00:00
christos
1394f01b4a
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
1997-07-16 14:37:13 +00:00
christos
91c9c62e44
Fix RCSID's
1997-07-13 18:45:15 +00:00
christos
35abd9e88d
Add missing math.h include
...
Fix RCSIDs
1997-07-13 18:38:28 +00:00
jtc
5f28317441
Use xorl/movb instead of movzbl when loading registers before computing
...
the return value.
1997-05-19 23:55:00 +00:00
kleink
2913a7a8a4
Consistency: distinguish between PSEUDO() and PSEUDO_NOERROR().
1997-05-02 18:15:15 +00:00
thorpej
1f92a78982
DEFS.h is gone from here, don't copy it up to libkern. (It will be gone
...
from libkern soon, as well)
1997-04-25 01:04:15 +00:00
thorpej
aa6103a33e
Garbage-collect unneeded file.
1997-04-24 23:50:27 +00:00
cgd
f4b5c163ef
__asm rather than asm, for lint
1996-12-20 20:35:48 +00:00
jtc
11935403ef
PROF -> GPROF
1996-11-30 02:31:49 +00:00
jtc
f6f38dd61e
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.
1996-11-12 00:50:06 +00:00
mycroft
c9ec05f4b2
Treat reboot() like a normal system call. From PR 2458.
1996-11-11 13:41:08 +00:00
jtc
9d7f517756
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.
1996-10-17 18:14:56 +00:00
jtc
daa40d9a50
Add explicit return type
1996-02-05 04:30:51 +00:00
jtc
43d7567da3
Removed unused CALL macro
1995-12-28 22:35:54 +00:00
jtc
051ae6c48a
Remove #include "SYS.h"; it is not needed (by normal assembly functions)
1995-12-28 21:32:25 +00:00
jtc
3f78e35cca
Use <machine/asm.h> instead of DEFS.h
1995-12-28 20:03:51 +00:00
jtc
24a6d94c0d
Added macros definitions for use with ANSI preprocessors.
1995-12-28 19:44:11 +00:00
pk
02cf7515b7
Make PIC safe.
1995-06-20 22:45:46 +00:00
jtc
7b4ed4f858
Winning Strategies has placed this code into the Public Domain
1995-04-28 22:59:46 +00:00
jtc
390695fb9c
$Id: $ -> $NetBSD: $
1995-04-28 22:57:54 +00:00
jtc
954b796156
Winning Strategies has placed this code into the Public Domain
1995-04-28 22:53:59 +00:00
mycroft
10cfe03e6d
Stylistic change to match fpsetsticky().
1995-04-09 21:55:50 +00:00
mycroft
65a1322cd9
Reverse sense of exception bits.
1995-04-09 21:55:20 +00:00
mycroft
42d9c8af6c
Oops; need to use fnstenv/fldenv for this.
1995-04-09 21:00:57 +00:00
mycroft
a94ab51d20
Fix typo.
1995-04-09 20:44:02 +00:00
mycroft
10b402aa60
Add fpset{mask,round,sticky}().
1995-04-09 20:33:13 +00:00
mycroft
ddbc579aa7
Another optimization.
1995-04-09 19:31:33 +00:00
mycroft
14e246dc4a
Optimize.
1995-04-09 19:18:49 +00:00
jtc
907e54c9e9
ENTRY(fpgetmask) -> ENTRY(fpgetsticky)
1995-04-09 19:14:28 +00:00
jtc
80bba6a1e1
Added flt_rounds, fpget{round,mask,sticky}.
1995-04-07 14:57:16 +00:00
mycroft
ce36f636ab
Separate machine dependencies.
1995-03-20 14:45:27 +00:00
mycroft
4c34be6b52
Clean up deleted files.
1995-03-01 00:00:00 +00:00
cgd
572e3f3188
don't forget inifinity.c
1995-02-25 16:24:22 +00:00
cgd
ea1ca14ecb
need these for new gen/Makefile
1995-02-25 16:20:12 +00:00
cgd
6929ad87a5
need these now, with new net Makefile.inc
1995-02-25 14:58:43 +00:00
jtc
e7d917e6eb
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.
1995-02-17 06:01:47 +00:00
mycroft
d04155c293
Optimize better.
1995-02-05 14:58:44 +00:00
jtc
b4bd7fea24
Replaced pops with adds.
1994-12-24 01:16:44 +00:00
jtc
26eccb0a9b
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).
1994-12-24 01:05:44 +00:00
mycroft
fcc40a849d
If len == 0, then the result must be 0 regardless of the other arguments.
1994-11-24 16:36:35 +00:00
mycroft
2db41a19e7
Use trap gate to enter kernel.
1994-10-26 19:49:42 +00:00
mycroft
837f99d25c
Clean up deleted files.
1994-10-06 04:38:25 +00:00
mycroft
345c8ef85c
Clean up deleted files.
1994-04-02 05:36:54 +00:00
cgd
da34d8a406
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.
1994-04-02 05:36:52 +00:00
mycroft
b3086b2299
Need to set %edx to -1 before cerror, though perhaps we should have something
...
more generic for this.
1994-03-31 18:38:57 +00:00
mycroft
a3450ab6e8
Add a .text and .align to SYSCALL().
1994-03-31 18:31:23 +00:00
jtc
98cbb217ac
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.
1994-03-22 01:15:47 +00:00
jtc
1f29a3d910
Smaller & Faster.
1994-03-16 17:40:23 +00:00
jtc
5ac78ccb34
[hn]to[nh][sl] functions used xchgb %h1,%b1 instead of the faster (on the
...
i486 & i586) rorw $8, %w1.
1994-03-16 17:34:14 +00:00
jtc
915f7d4d3d
Use RCSID macro.
1994-03-12 01:48:26 +00:00
jtc
c95cd47ba2
Use RCSID macro for RCS ID's.
1994-03-12 01:39:55 +00:00
mycroft
90ff28fef4
Style police. Use je' and
jne' only on the result of an equality test;
...
use `jz' and `jnz' in all other cases.
1994-02-14 20:05:52 +00:00
jtc
7f582f99d4
Fix spelling mistake: cashe -> cache.
1994-02-14 17:45:16 +00:00
jtc
01284ad877
Performance improvement from Bruce Evans.
...
Removes one test instruction for each character.
1994-02-14 17:44:39 +00:00
jtc
f28455f783
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.
1994-02-14 17:43:19 +00:00
jtc
5cffad2151
Use movzbl, not movsbl, to zero extend for unsigned comparison.
...
Fix from Bruce Evans.
1994-02-07 20:57:05 +00:00
jtc
e2c220f94b
Fix spelling error in Copyright notice
1994-01-28 20:34:33 +00:00
mycroft
1fe07f186d
Separate curbrk and mincrk.
1994-01-27 15:08:03 +00:00
mycroft
3463cb4eef
Trivial speedup inspired by SPARC code.
1994-01-27 15:00:49 +00:00
mycroft
ef980f76fe
One last tweak.
1994-01-27 06:53:25 +00:00
mycroft
22e614ce10
Random cleanup.
1994-01-27 06:34:59 +00:00
mycroft
9c8862a970
Pedanticism.
1994-01-27 06:34:02 +00:00
mycroft
3cf1bd9939
SYS_brk --> SYS_break. Where's my axe?
1994-01-27 04:30:34 +00:00
mycroft
17b2a501cd
Stylistic changes.
1994-01-27 04:16:50 +00:00
mycroft
0496df7164
More stylistic changes.
1994-01-27 04:14:50 +00:00
mycroft
e84d8b28f3
Stylistic changes.
1994-01-27 04:10:20 +00:00
mycroft
b6b0ec3424
Fix bug jtc introduced.
1994-01-27 04:07:13 +00:00
jtc
7835a85a78
Optimization tweaks:
...
Use testl %reg,%reg instead of cmpl $0,%reg
Use xorl %reg,%reg instead of movl $0,%reg
1994-01-24 19:24:36 +00:00
pk
39c0326588
PIC_*() macros moved to <machine/asm.h>
1994-01-07 00:48:22 +00:00
jtc
0e09f939b2
Fix bug #24 by renaming _logname_valid to __logname_valid.
1993-12-18 01:02:47 +00:00
mycroft
cc81da7447
Shorten setup for longword operations a little.
1993-12-10 10:51:11 +00:00
mycroft
dca61f6f90
Share code.
1993-12-10 10:45:18 +00:00
jtc
a9e5cc4f83
No reason these can't share code...
1993-12-08 22:10:14 +00:00
pk
f3f7594fc9
Use PIC_PLT for error returns.
...
Correct operand order in accessing `minbrk' and `curbrk'.
1993-12-06 23:28:08 +00:00
pk
417e7a6fff
Remove spurious PIC_EPILOGUE and PIC_GOTOFF macros.
1993-12-06 23:27:04 +00:00
pk
3581f42619
Use PIC_PLT() macro for error returns
1993-12-06 23:26:04 +00:00
cgd
0ada107897
update for .S and MACHINE_ARCH
1993-12-04 02:33:35 +00:00
mycroft
448e711c78
Clean up deleted files.
1993-12-04 01:28:42 +00:00
jtc
32d96ccd3c
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.
1993-11-25 01:18:24 +00:00
cgd
2be44f5352
copy SYS.h and DEFS.h, too.
1993-11-05 22:44:00 +00:00
jtc
4418616857
Move the old berkeley sccs id into the header comment like it is done
...
for other source files.
1993-10-21 02:19:25 +00:00
jtc
6be8b83abc
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).
1993-10-21 02:03:37 +00:00
jtc
34d1aad0c1
Use PIC_PLT macro with the function calls (as was done with setjmp()).
1993-10-21 01:59:44 +00:00
jtc
79591d04bc
So many files in arch/i386 have been changed I might as well run my
...
remove unecessary trailing whitespace script.
1993-10-21 01:48:14 +00:00
jtc
823c36577c
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.
1993-10-21 01:39:55 +00:00
jtc
97ad548bc0
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.
1993-10-20 18:50:15 +00:00
jtc
6802033480
sigsetjmp() for the i386.
1993-10-19 20:44:00 +00:00
jtc
39ff8227a8
Makefile.inc, basically a place to put KMSRC definition
1993-10-15 01:24:47 +00:00