Commit Graph

142 Commits

Author SHA1 Message Date
christos 91c9c62e44 Fix RCSID's 1997-07-13 18:45:15 +00:00
christos f6ff6c08f8 Fix RCSID's
Add missing math.h include
1997-07-13 18:41:38 +00:00
christos b3bd98a5e6 Fix RCSID's
Add missing math.h include
1997-07-13 18:39:54 +00:00
jtc f486d77a92 I removed the extra instructions which compute the return value in Hiroshi
Horitomo's implementation a bit too hastily.  They are required to handle
the unsigned comparison required by the standard.
1997-05-18 21:24:46 +00:00
jtc 530ba70aa3 New implementations of strcmp() and strncmp().
This code uses subb instead of cmpb to compare chars.  When they are
not equal, the function's return value is computed by sign extending
the difference.  The basic idea was contributed by Hiroshi Horitomo
<horimoto@cs-aoi.cs.sist.ac.jp> in PR #3223, but his implementation
used additional instructions to compute the return value.

Also, the series of insns used to compare one pair of characters has
been unrolled 4 times.  This helps the 680[23]0, where the cost of a
taken branch is significantly more than that of a not-taken branch.
1997-05-18 20:32:20 +00:00
jtc 8da7150a8a Fix typo 1997-05-15 16:17:20 +00:00
jtc 042efd19d5 Fixup reverse bcopy 1997-05-15 16:07:31 +00:00
jtc ca7515b48a oops, bzero -> memset 1997-05-14 18:18:44 +00:00
jtc 6391090ebf Change b{eq,ne,lt,le,gt,ge} -> j{eq,ne,lt,le,gt,ge}. 1997-05-13 19:27:21 +00:00
jtc d46e665a16 Faster versions of bcmp(), bcopy(), bzero(), and memset().
The implementation of these functions is losely based on the original
BSD code plus versions I was working on which would yeild code tuned
for a particular m68k or coldfire family cpu, code space or run time
efficiency, etc. depending on the values of various macros.

My original code was intended for use in OS-less embedded systems.
Because NetBSD can not benefit from the considerable complexity, I've
removed the extraneous preprocessor goop.  The resulting code is tuned
for the '020 - '060.  It will not function on the '000 or coldfire.
1997-05-13 19:20:58 +00:00
kleink 2913a7a8a4 Consistency: distinguish between PSEUDO() and PSEUDO_NOERROR(). 1997-05-02 18:15:15 +00:00
thorpej d0fed6c87d Use <machine/asm.h> 1997-04-25 00:58:41 +00:00
thorpej 5ef4bdf6cf Architecture-specific bits for libc on the PowerPC. From Wolfgang
Solfrank <ws@tools.de>
1997-03-29 20:55:50 +00:00
thorpej 952eb61ea3 Define immediate values properly for the __STDC__ preprocessor case,
from Hiroshi HORIMOTO <horimoto@cs-aoi.cs.sist.ac.jp>, PR #3222.
1997-03-08 06:32:08 +00:00
jtc f42ebd4897 #include <machine/asm.h> instead of "DEFS.h" 1997-01-04 03:26:18 +00:00
jtc 48030a80ae Use jCC instead of bCC, as the assembler will then use the (smaller,
faster) byte-displacement form of the instruction if the offset will
fit.  This happens to be all occurances in this case, so I could have
used bCCs.  However, a quick survey of the rest of NetBSD's m68k code
showed that jCC was used in similar cases.  I did the same to be
consistant.
1997-01-04 03:21:11 +00:00
jtc 4990f8b035 Add L prefix on local labels 1997-01-03 22:57:04 +00:00
jtc 11935403ef PROF -> GPROF 1996-11-30 02:31:49 +00:00
jtc 37b491a006 Add L prefix to local labels 1996-11-30 02:01:26 +00:00
jtc 0dfdcfdfde Fix typo 1996-11-19 03:15:51 +00:00
mycroft c9ec05f4b2 Treat reboot() like a normal system call. From PR 2458. 1996-11-11 13:41:08 +00:00
jtc cbae3f00b8 Change __REENTRANT to _REENTRANT, the latter is used Solaris and I can
think of no good reason to be different.
1996-11-07 05:20:33 +00:00
jtc f1af62ef3d Changed so that when __REENTRANT is defined, cerror calls __errno()
for the address of a variable used to store the error number instead
of writing to the global errno.

In a multi-threaded program, __errno() will return a pointer to a
thread-specific variable.
1996-11-07 05:16:41 +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 16e8217f5a new implementation that simply clears most significant bit 1996-06-26 15:05:40 +00:00
jtc 290756c01b use fscalel instead of ftwotoxl/fmulx 1996-06-26 15:04:06 +00:00
jtc 57ceb7a883 Added ashldi3.S, ashrdi3.S, and lshrdi3.S to KMSRCS 1996-06-01 01:08:02 +00:00
jtc ff3bd4df33 m68k assembly versions of 64 bit shift functions 1996-05-31 02:05:33 +00:00
cgd 734132ad28 have copy-to-libkern copy strcat.S, not strcat.c 1996-04-18 01:54:16 +00:00
jtc daa40d9a50 Add explicit return type 1996-02-05 04:30:51 +00:00
jtc 723b71b52c removed :errfix; const qualifier makes it unnecessary 1995-12-28 22:37:55 +00:00
thorpej 915f0a8f9b New-style RCS ids. 1995-12-13 22:21:23 +00:00
thorpej 6cdbd4c23a New-style RCS ids. Use the RCSID() macro where appropriate. 1995-12-13 22:17:46 +00:00
thorpej 9573504567 New-style RCS ids. Use the RCSID() macro where appropriate. 1995-12-13 21:46:13 +00:00
thorpej 9f1ee9ae9c New-style RCS id's. In assmebly files, use the RCSID() macro where
appropriate.
1995-12-13 19:35:39 +00:00
thorpej ed63b163c8 Fix a brain-o by me; if I'm going to use stuff in <machine/asm.h>, I better
darn well include it in the right place.  "Hello, McFly!"
1995-11-28 23:40:47 +00:00
thorpej ced1925e35 Fix a typo. 1995-11-28 22:50:18 +00:00
thorpej bebc2d5787 New style RCS ids, and employ the RCSID() macro. 1995-11-17 20:21:10 +00:00
jtc 4def0687f4 fix stupid typo 1995-11-17 19:32:26 +00:00
jtc a0ed1b8ba8 Assembly language implementation of strcat(). Derived by merging existing
strlen() and strcpy() functions.
1995-10-21 20:24:48 +00:00
jtc 8a5e159d9f Rewrite to remove instruction in inside of loop. Instead of maintaining a
count, subtract the start address from the end address.
1995-10-21 20:21:15 +00:00
jtc ba9dbab5b4 remove single quote from comment 1995-06-29 20:42:22 +00:00
briggs b1f67e2969 m68k sig{set,long}jmp from Henric Jungheim (uhenric@mcl.ucsb.edu) as
followup to GNATS report port-amiga/1009.
Passes regression tests.
I added a NetBSD string and changed jbra to jra.
1995-05-03 03:43:05 +00:00
mycroft ae34e2ea6e Put jtc's notice back, since these are now roughly identical. 1995-04-09 23:32:53 +00:00
mycroft ac11de32c1 Actually, bitfields are faster on the '040; optimize for it, but adjust the
fields so that the mask and sticky bits are the same.
1995-04-09 23:28:38 +00:00
mycroft 99a6cfe734 Rewrite these to use the accrued exception byte for sticky flags, and to
avoid expensive bitfield instructions.
1995-04-09 22:49:26 +00:00
mycroft a94ab51d20 Fix typo. 1995-04-09 20:44:02 +00:00
mycroft 14e246dc4a Optimize. 1995-04-09 19:18:49 +00:00
jtc 1b41528de0 removed commented-out #include <machine/asm.h> 1995-04-09 19:13:26 +00:00
jtc 30c05ea2b8 Added __flt_rounds(), fp{get,set}{round,mask,sticky}(). 1995-04-07 00:41:43 +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
mycroft e90d9fb8a6 Make the coding style more consistent. 1995-02-08 18:33:12 +00:00
mycroft ae5740f063 size_t is unsigned. 1995-02-08 18:15:25 +00:00
mycroft f1b3337a0b Need to divide count by 2. 1995-01-07 03:44:55 +00:00
mycroft 6ba85483c3 Use bfffo rather than a slow loop. 1994-09-09 03:07:23 +00:00
mycroft af176ad58f Revert this. 1994-08-05 22:35:20 +00:00
chopps 628cf4e2c8 fixed ld.so to properly save all regs when binding PIC functions. We no
longer need the special case (PIC) code to push args when calling cerror.
1994-08-04 05:02:31 +00:00
chopps 03dbf74333 inline call to sigreturn original idea from jason downs <downsj@CSOS.ORST.EDU>
we want this to be done for everything including non-PIC code as longjmp()
does non-standard things with regs and wouldn't like it if the user replaced
the sigreturn() stub.
1994-08-04 05:00:50 +00:00
chopps a6a8e78548 update to use sigaltstack. 1994-05-10 08:15:57 +00:00
mycroft ca01015e04 Clean up deleted files. 1994-04-02 05:37:06 +00:00
cgd b62b3fc050 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:37:04 +00:00
mycroft d5dbb53fee Set d1 to -1 before cerror. 1994-03-31 18:50:58 +00:00
chopps 2c8fad6100 Need for copy-to-libkern-machdep in ../../Makefile 1994-03-29 07:10:36 +00:00
mycroft b05d947874 Clean up deleted files. 1994-03-17 01:58:27 +00:00
chopps 4abc3ff245 handle __STDC__ preprocessor. 1994-02-08 02:31:55 +00:00
mycroft 48ae66e2eb Use machine/asm.h for ENTRY() macros. 1994-01-30 21:55:52 +00:00
mycroft f5fbffc1f4 Just use definitions from machine/asm.h. 1994-01-29 09:56:54 +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 c25c219087 Random cleanup. 1994-01-27 14:45:52 +00:00
jtc 0e09f939b2 Fix bug #24 by renaming _logname_valid to __logname_valid. 1993-12-18 01:02:47 +00:00
mycroft cd8e1bd162 No reason these can't share code... 1993-12-08 21:01:56 +00:00
mycroft 1f063d60c0 Fix a bug, and speed up by a few cycles. 1993-12-07 06:58:35 +00:00
mycroft 2c216884a8 Fix typo. 1993-12-07 03:28:53 +00:00
mycroft 6103136f3b Fix typo. 1993-12-07 02:05:27 +00:00
mycroft ca4372787c Fix a couple of nits. 1993-12-06 23:45:48 +00:00
mycroft 50ee78b26f Assembler version. 1993-12-06 23:16:05 +00:00
mycroft 8449f5103c More assembler code. 1993-12-06 23:08:46 +00:00
mycroft a0f51b3da9 Fudged an addressing mode. 1993-12-06 22:51:41 +00:00
mycroft ff88d330ae Initially cloned from bcmp.S. 1993-12-06 22:37:15 +00:00
mycroft b5c51ee600 #define the appropriate symbol and #include bcopy.S. 1993-12-06 22:13:08 +00:00
mycroft 87a251f506 Add code for memcpy() and memmove(). 1993-12-06 22:12:04 +00:00
briggs 0db5dab189 Ovfork doesn't get .even any other way, so we must explicitly give it
one.
1993-12-04 18:59:42 +00:00
mycroft 448e711c78 Clean up deleted files. 1993-12-04 01:28:42 +00:00
paulus e290fb8f79 Changed beq's to jeq's, because (a) the jeq gets optimized to a short branch,
and (b) gas currently assembles the beq's wrongly.
1993-11-30 00:45:15 +00:00
paulus 75d4ac9791 Machine-dependent files for generic m68k machines (copied from hp300),
modified to support shared libraries.
1993-11-25 23:39:23 +00:00
paulus 5f70961885 Machine-dependent files for generic m68k machines (copied from hp300) 1993-11-25 23:36:47 +00:00
paulus a1eb25471d Machine-dependent files for generic m68k machines, with shared library support. 1993-11-25 23:34:07 +00:00