Home | History | Annotate | only in /src/lib/libc/arch/m68k/string
History log of /src/lib/libc/arch/m68k/string
RevisionDateAuthorComments
 1.5 30-Jul-2009  dsl 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 05-Feb-2001  scottr Implement a significantly improved version of memccpy(), with thanks to
Ignatios Souvatzis for correcting the SVR4 ABI code and for a few
micro-optimizations that followed from these changes.
 1.2 21-Oct-1995  jtc branches: 1.2.18;
Assembly language implementation of strcat(). Derived by merging existing
strlen() and strcpy() functions.
 1.1 20-Mar-1995  mycroft Separate machine dependencies.
 1.2.18.1 26-Feb-2001  he Pull up revision 1.3 (requested by scottr):
Implement a significantly improved version of memccpy().
 1.14 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 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 17-May-2001  fredette On the 68010, we are forced to do bytewise compares
and copies if the two addresses aren't of the same
evenness.
 1.11 25-Oct-1999  thorpej branches: 1.11.8;
Add register prefixes.
 1.10 15-May-1997  jtc branches: 1.10.6;
Fix typo
 1.9 13-May-1997  jtc Change b{eq,ne,lt,le,gt,ge} -> j{eq,ne,lt,le,gt,ge}.
 1.8 13-May-1997  jtc 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.
 1.7 04-Jan-1997  jtc #include <machine/asm.h> instead of "DEFS.h"
 1.6 04-Jan-1997  jtc 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.
 1.5 30-Nov-1996  jtc Add L prefix to local labels
 1.4 28-Nov-1995  thorpej 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!"
 1.3 17-Nov-1995  thorpej New style RCS ids, and employ the RCSID() macro.
 1.2 08-Feb-1995  mycroft Make the coding style more consistent.
 1.1 25-Nov-1993  paulus Machine-dependent files for generic m68k machines (copied from hp300)
 1.10.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.11.8.1 08-Oct-2001  nathanw Catch up to -current.
 1.2 04-Dec-1993  mycroft Clean up deleted files.
 1.1 25-Nov-1993  paulus Machine-dependent files for generic m68k machines (copied from hp300)
 1.18 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 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 17-May-2001  fredette On the 68010, we are forced to do bytewise compares
and copies if the two addresses aren't of the same
evenness.
 1.15 25-Oct-1999  thorpej branches: 1.15.8;
Add register prefixes.
 1.14 02-May-1999  kleink branches: 1.14.2;
When using the SVR4 ABI, return pointer results in a0, too.
 1.13 15-May-1997  jtc Fixup reverse bcopy
 1.12 13-May-1997  jtc Change b{eq,ne,lt,le,gt,ge} -> j{eq,ne,lt,le,gt,ge}.
 1.11 13-May-1997  jtc 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.
 1.10 04-Jan-1997  jtc #include <machine/asm.h> instead of "DEFS.h"
 1.9 04-Jan-1997  jtc 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.
 1.8 28-Nov-1995  thorpej 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!"
 1.7 17-Nov-1995  thorpej New style RCS ids, and employ the RCSID() macro.
 1.6 29-Jun-1995  jtc remove single quote from comment
 1.5 08-Feb-1995  mycroft Make the coding style more consistent.
 1.4 08-Feb-1995  mycroft size_t is unsigned.
 1.3 07-Dec-1993  mycroft Fix typo.
 1.2 06-Dec-1993  mycroft Add code for memcpy() and memmove().
 1.1 25-Nov-1993  paulus Machine-dependent files for generic m68k machines (copied from hp300)
 1.14.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.15.8.1 08-Oct-2001  nathanw Catch up to -current.
 1.2 04-Dec-1993  mycroft Clean up deleted files.
 1.1 25-Nov-1993  paulus Machine-dependent files for generic m68k machines (copied from hp300)
 1.12 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 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 25-Oct-1999  thorpej Add register prefixes.
 1.9 13-May-1997  jtc branches: 1.9.6;
Change b{eq,ne,lt,le,gt,ge} -> j{eq,ne,lt,le,gt,ge}.
 1.8 13-May-1997  jtc 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.
 1.7 04-Jan-1997  jtc #include <machine/asm.h> instead of "DEFS.h"
 1.6 04-Jan-1997  jtc 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.
 1.5 30-Nov-1996  jtc Add L prefix to local labels
 1.4 28-Nov-1995  thorpej 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!"
 1.3 17-Nov-1995  thorpej New style RCS ids, and employ the RCSID() macro.
 1.2 08-Feb-1995  mycroft Make the coding style more consistent.
 1.1 25-Nov-1993  paulus Machine-dependent files for generic m68k machines (copied from hp300)
 1.9.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2 04-Dec-1993  mycroft Clean up deleted files.
 1.1 25-Nov-1993  paulus Machine-dependent files for generic m68k machines (copied from hp300)
 1.10 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 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 17-May-2001  fredette On the 68010 only, assemble a different version of
this function, since the 68010 doesn't have bit
instructions.
 1.7 25-Oct-1999  thorpej branches: 1.7.8;
Add register prefixes.
 1.6 04-Jan-1997  jtc branches: 1.6.6;
#include <machine/asm.h> instead of "DEFS.h"
 1.5 28-Nov-1995  thorpej 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!"
 1.4 17-Nov-1995  thorpej New style RCS ids, and employ the RCSID() macro.
 1.3 09-Sep-1994  mycroft Use bfffo rather than a slow loop.
 1.2 30-Nov-1993  paulus 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.
 1.1 25-Nov-1993  paulus Machine-dependent files for generic m68k machines (copied from hp300)
 1.6.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.7.8.1 08-Oct-2001  nathanw Catch up to -current.
 1.3 04-Dec-1993  mycroft Clean up deleted files.
 1.2 30-Nov-1993  paulus 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.
 1.1 25-Nov-1993  paulus Machine-dependent files for generic m68k machines (copied from hp300)
 1.11 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 1.10 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.9 25-Oct-1999  thorpej Add register prefixes.
 1.8 02-May-1999  kleink branches: 1.8.2;
When using the SVR4 ABI, return pointer results in a0, too.
 1.7 04-Jan-1997  jtc #include <machine/asm.h> instead of "DEFS.h"
 1.6 04-Jan-1997  jtc 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.
 1.5 28-Nov-1995  thorpej 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!"
 1.4 17-Nov-1995  thorpej New style RCS ids, and employ the RCSID() macro.
 1.3 08-Feb-1995  mycroft Make the coding style more consistent.
 1.2 08-Dec-1993  mycroft No reason these can't share code...
 1.1 25-Nov-1993  paulus Machine-dependent files for generic m68k machines (copied from hp300)
 1.8.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2 04-Dec-1993  mycroft Clean up deleted files.
 1.1 25-Nov-1993  paulus Machine-dependent files for generic m68k machines (copied from hp300)
 1.5 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.4 18-Jul-2013  matt Adjust for coldfire
 1.3 16-Jul-2013  matt branches: 1.3.2;
Add END(func)
 1.2 16-Jul-2013  matt Convert to normal Motorola syntax for addressing.
%r@ -> (%r)
%r@- -> -(%r)
%r@+ -> (%r)+
%r@(n) n(%r)
etc.
No object differences.
 1.1 05-Feb-2001  scottr branches: 1.1.2; 1.1.62; 1.1.68;
Implement a significantly improved version of memccpy(), with thanks to
Ignatios Souvatzis for correcting the SVR4 ABI code and for a few
micro-optimizations that followed from these changes.

The overall improvement was measured at 3-4x for copies of at least
4 bytes on the 68030, and 8 bytes on the 68040. For smaller copies
the improvement was still measurable, if not as dramatic.
 1.1.68.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.62.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.1.2.2 26-Feb-2001  he Pull up revision 1.1 (new, requested by scottr):
Implement a significantly improved version of memccpy().
 1.1.2.1 05-Feb-2001  he file memccpy.S was added on branch netbsd-1-5 on 2001-02-26 16:32:19 +0000
 1.3.2.1 23-Jul-2013  riastradh sync with HEAD
 1.12 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 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 25-Oct-1999  thorpej Add register prefixes.
 1.9 13-May-1997  jtc branches: 1.9.6;
Change b{eq,ne,lt,le,gt,ge} -> j{eq,ne,lt,le,gt,ge}.
 1.8 04-Jan-1997  jtc #include <machine/asm.h> instead of "DEFS.h"
 1.7 28-Nov-1995  thorpej 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!"
 1.6 17-Nov-1995  thorpej New style RCS ids, and employ the RCSID() macro.
 1.5 08-Feb-1995  mycroft Make the coding style more consistent.
 1.4 06-Dec-1993  mycroft Fix a couple of nits.
 1.3 06-Dec-1993  mycroft More assembler code.
 1.2 06-Dec-1993  mycroft Fudged an addressing mode.
 1.1 06-Dec-1993  mycroft Initially cloned from bcmp.S.
 1.9.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.4 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 1.3 09-Jan-1998  perry RCS Id Police.
 1.2 07-Dec-1993  mycroft Fix typo.
 1.1 06-Dec-1993  mycroft #define the appropriate symbol and #include bcopy.S.
 1.4 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 1.3 09-Jan-1998  perry RCS Id Police.
 1.2 07-Dec-1993  mycroft Fix typo.
 1.1 06-Dec-1993  mycroft #define the appropriate symbol and #include bcopy.S.
 1.15 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 1.14 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.13 07-Sep-2001  fredette On the 68010, don't bother with the by-8-longwords loop, instead
only 16-bit align the region and use loop mode with longwords
to do the bulk of the work.

On the 68020+, fixed an optimization bug where all regions that start
on odd addresses would not be properly longword aligned.
 1.12 25-Oct-1999  thorpej branches: 1.12.8;
Add register prefixes.
 1.11 02-May-1999  kleink branches: 1.11.2;
When using the SVR4 ABI, return pointer results in a0, too.
 1.10 14-May-1997  jtc oops, bzero -> memset
 1.9 13-May-1997  jtc Change b{eq,ne,lt,le,gt,ge} -> j{eq,ne,lt,le,gt,ge}.
 1.8 13-May-1997  jtc 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.
 1.7 04-Jan-1997  jtc #include <machine/asm.h> instead of "DEFS.h"
 1.6 28-Nov-1995  thorpej 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!"
 1.5 17-Nov-1995  thorpej New style RCS ids, and employ the RCSID() macro.
 1.4 08-Feb-1995  mycroft Make the coding style more consistent.
 1.3 07-Dec-1993  mycroft Fix a bug, and speed up by a few cycles.
 1.2 06-Dec-1993  mycroft Fix a couple of nits.
 1.1 06-Dec-1993  mycroft More assembler code.
 1.11.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.12.8.1 08-Oct-2001  nathanw Catch up to -current.
 1.11 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 1.10 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.9 25-Oct-1999  thorpej Add register prefixes.
 1.8 02-May-1999  kleink branches: 1.8.2;
When using the SVR4 ABI, return pointer results in a0, too.
 1.7 04-Jan-1997  jtc #include <machine/asm.h> instead of "DEFS.h"
 1.6 04-Jan-1997  jtc 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.
 1.5 28-Nov-1995  thorpej 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!"
 1.4 17-Nov-1995  thorpej New style RCS ids, and employ the RCSID() macro.
 1.3 08-Feb-1995  mycroft Make the coding style more consistent.
 1.2 08-Dec-1993  mycroft No reason these can't share code...
 1.1 25-Nov-1993  paulus Machine-dependent files for generic m68k machines (copied from hp300)
 1.8.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2 04-Dec-1993  mycroft Clean up deleted files.
 1.1 25-Nov-1993  paulus Machine-dependent files for generic m68k machines (copied from hp300)
 1.11 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 1.10 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.9 25-Oct-1999  thorpej Add register prefixes.
 1.8 02-May-1999  kleink branches: 1.8.2;
When using the SVR4 ABI, return pointer results in a0, too.
 1.7 04-Jan-1997  jtc #include <machine/asm.h> instead of "DEFS.h"
 1.6 04-Jan-1997  jtc 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.
 1.5 03-Jan-1997  jtc Add L prefix on local labels
 1.4 28-Nov-1995  thorpej 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!"
 1.3 17-Nov-1995  thorpej New style RCS ids, and employ the RCSID() macro.
 1.2 17-Nov-1995  jtc fix stupid typo
 1.1 21-Oct-1995  jtc Assembly language implementation of strcat(). Derived by merging existing
strlen() and strcpy() functions.
 1.8.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.3 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 1.2 09-Jan-1998  perry RCS Id Police.
 1.1 08-Dec-1993  mycroft No reason these can't share code...
 1.18 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 1.17 26-Jul-2003  salo netbsd.org->NetBSD.org
 1.16 17-May-2001  fredette Use the EXTBL macro where we want the extbl instruction.
On the 68010 this expands to an extw/extl combination.
 1.15 28-Nov-2000  is branches: 1.15.2;
Another change by Hiroshi Horimoto.
 1.14 27-Oct-1999  is Fix spelling of contributors name
 1.13 25-Oct-1999  thorpej Add register prefixes.
 1.12 24-Jul-1997  jtc branches: 1.12.6;
Revert last change, some folks have reported problems
 1.11 21-Jul-1997  jtc Use insn sequence found by superoptimizer to compute return value. This
avoids the relatively expensive scc and ext instructions.
 1.10 18-May-1997  jtc 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.
 1.9 18-May-1997  jtc 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.
 1.8 04-Jan-1997  jtc #include <machine/asm.h> instead of "DEFS.h"
 1.7 04-Jan-1997  jtc 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.
 1.6 03-Jan-1997  jtc Add L prefix on local labels
 1.5 28-Nov-1995  thorpej 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!"
 1.4 28-Nov-1995  thorpej Fix a typo.
 1.3 17-Nov-1995  thorpej New style RCS ids, and employ the RCSID() macro.
 1.2 08-Feb-1995  mycroft Make the coding style more consistent.
 1.1 25-Nov-1993  paulus Machine-dependent files for generic m68k machines (copied from hp300)
 1.12.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.15.2.1 08-Oct-2001  nathanw Catch up to -current.
 1.2 04-Dec-1993  mycroft Clean up deleted files.
 1.1 25-Nov-1993  paulus Machine-dependent files for generic m68k machines (copied from hp300)
 1.11 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 1.10 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.9 25-Oct-1999  thorpej Add register prefixes.
 1.8 02-May-1999  kleink branches: 1.8.2;
When using the SVR4 ABI, return pointer results in a0, too.
 1.7 04-Jan-1997  jtc #include <machine/asm.h> instead of "DEFS.h"
 1.6 04-Jan-1997  jtc 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.
 1.5 03-Jan-1997  jtc Add L prefix on local labels
 1.4 28-Nov-1995  thorpej 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!"
 1.3 17-Nov-1995  thorpej New style RCS ids, and employ the RCSID() macro.
 1.2 08-Feb-1995  mycroft Make the coding style more consistent.
 1.1 25-Nov-1993  paulus Machine-dependent files for generic m68k machines (copied from hp300)
 1.8.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2 01-Mar-1995  mycroft Clean up deleted files.
 1.1 25-Nov-1993  paulus Machine-dependent files for generic m68k machines (copied from hp300)
 1.11 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 1.10 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.9 25-Oct-1999  thorpej Add register prefixes.
 1.8 04-Jan-1997  jtc branches: 1.8.6;
#include <machine/asm.h> instead of "DEFS.h"
 1.7 04-Jan-1997  jtc 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.
 1.6 03-Jan-1997  jtc Add L prefix on local labels
 1.5 28-Nov-1995  thorpej 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!"
 1.4 17-Nov-1995  thorpej New style RCS ids, and employ the RCSID() macro.
 1.3 21-Oct-1995  jtc Rewrite to remove instruction in inside of loop. Instead of maintaining a
count, subtract the start address from the end address.
 1.2 08-Feb-1995  mycroft Make the coding style more consistent.
 1.1 25-Nov-1993  paulus Machine-dependent files for generic m68k machines (copied from hp300)
 1.8.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2 01-Mar-1995  mycroft Clean up deleted files.
 1.1 25-Nov-1993  paulus Machine-dependent files for generic m68k machines (copied from hp300)
 1.16 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 1.15 26-Jul-2003  salo netbsd.org->NetBSD.org
 1.14 17-May-2001  fredette Use the EXTBL macro where we want the extbl instruction.
On the 68010 this expands to an extw/extl combination.
 1.13 27-Oct-1999  is branches: 1.13.8;
Fix spelling of contributors name
 1.12 25-Oct-1999  thorpej Add register prefixes.
 1.11 24-Jul-1997  jtc branches: 1.11.6;
Revert last change, some folks have reported problems
 1.10 21-Jul-1997  jtc Use insn sequence found by superoptimizer to compute return value. This
avoids the relatively expensive scc and ext instructions.
 1.9 18-May-1997  jtc 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.
 1.8 18-May-1997  jtc 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.
 1.7 04-Jan-1997  jtc #include <machine/asm.h> instead of "DEFS.h"
 1.6 04-Jan-1997  jtc 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.
 1.5 03-Jan-1997  jtc Add L prefix on local labels
 1.4 28-Nov-1995  thorpej 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!"
 1.3 17-Nov-1995  thorpej New style RCS ids, and employ the RCSID() macro.
 1.2 08-Feb-1995  mycroft Make the coding style more consistent.
 1.1 25-Nov-1993  paulus Machine-dependent files for generic m68k machines (copied from hp300)
 1.11.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.13.8.1 08-Oct-2001  nathanw Catch up to -current.
 1.2 01-Mar-1995  mycroft Clean up deleted files.
 1.1 25-Nov-1993  paulus Machine-dependent files for generic m68k machines (copied from hp300)
 1.13 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 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 27-Nov-2000  is Use dbeq loops, code submitted by Hiroshi Horimoto in PR 3223, integrated
and tested by Allen Briggs.
Needs 1/3 less time on 68030, 45% less time on 68040.
XXX On 68060, 1/2 less time for the padding part, but 40% more time on the
copy part. I've stared at the 68060 User Manual, but can't understand why;
must be some wierd (branch) cache interaction.
 1.10 25-Oct-1999  thorpej Add register prefixes.
 1.9 02-May-1999  kleink branches: 1.9.2;
When using the SVR4 ABI, return pointer results in a0, too.
 1.8 13-May-1997  jtc Change b{eq,ne,lt,le,gt,ge} -> j{eq,ne,lt,le,gt,ge}.
 1.7 04-Jan-1997  jtc #include <machine/asm.h> instead of "DEFS.h"
 1.6 04-Jan-1997  jtc 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.
 1.5 03-Jan-1997  jtc Add L prefix on local labels
 1.4 28-Nov-1995  thorpej 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!"
 1.3 17-Nov-1995  thorpej New style RCS ids, and employ the RCSID() macro.
 1.2 08-Feb-1995  mycroft Make the coding style more consistent.
 1.1 25-Nov-1993  paulus Machine-dependent files for generic m68k machines (copied from hp300)
 1.9.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2 01-Mar-1995  mycroft Clean up deleted files.
 1.1 25-Nov-1993  paulus Machine-dependent files for generic m68k machines (copied from hp300)
 1.3 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 1.2 09-Jan-1998  perry RCS Id Police.
 1.1 08-Dec-1993  mycroft No reason these can't share code...
 1.11 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.10 18-Jul-2013  matt Adjust for coldfire
 1.9 16-Jul-2013  matt branches: 1.9.2;
Add END(func)
 1.8 16-Jul-2013  matt Convert to normal Motorola syntax for addressing.
%r@ -> (%r)
%r@- -> -(%r)
%r@+ -> (%r)+
%r@(n) n(%r)
etc.
No object differences.
 1.7 25-Oct-1999  thorpej branches: 1.7.66; 1.7.72;
Add register prefixes.
 1.6 04-Jan-1997  jtc branches: 1.6.6;
#include <machine/asm.h> instead of "DEFS.h"
 1.5 04-Jan-1997  jtc 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.
 1.4 17-Nov-1995  thorpej New style RCS ids, and employ the RCSID() macro.
 1.3 08-Feb-1995  mycroft Make the coding style more consistent.
 1.2 07-Jan-1995  mycroft Need to divide count by 2.
 1.1 06-Dec-1993  mycroft Assembler version.
 1.6.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.7.72.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.66.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.9.2.1 23-Jul-2013  riastradh sync with HEAD

RSS XML Feed