Commit Graph

133 Commits

Author SHA1 Message Date
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
jtc 479a1c33c9 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.
1993-10-08 23:57:13 +00:00
jtc e09d2f42db 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.
1993-10-08 01:25:51 +00:00
jtc b3f9f8f6f4 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.
1993-10-08 00:01:04 +00:00
cgd 0b9f50897e make an arch directory in libc, and move all machine dirs into it 1993-10-07 00:17:24 +00:00