Commit Graph

97 Commits

Author SHA1 Message Date
jtc
5dbbebc601 Revert last change, some folks have reported problems 1997-07-24 19:10:38 +00:00
jtc
5e436cd360 Use insn sequence found by superoptimizer to compute return value. This
avoids the relatively expensive scc and ext instructions.
1997-07-21 13:56:10 +00:00
veego
f58c16ffe9 Remove the duplicated __builtin_saveregs function.
We only need it in src/gnu/usr.bin/gcc/libgcc/libgcc2.c.
1997-07-14 21:04:43 +00:00
christos
e80ba636a1 Builtin saveregs returns void *, not void. 1997-07-14 19:36:44 +00:00
christos
b9af52952a Add missing prototypes. From Bernd. 1997-07-14 02:13:56 +00:00
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