Commit Graph

42 Commits

Author SHA1 Message Date
kleink 4e0adc06d5 When using the SVR4 ABI, return pointer results in a0, too. 1999-05-02 20:34:04 +00:00
perry a3a46419b5 RCS Id Police. 1998-01-09 03:45:03 +00:00
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
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
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 37b491a006 Add L prefix to local labels 1996-11-30 02:01:26 +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
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
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 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
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 5f70961885 Machine-dependent files for generic m68k machines (copied from hp300) 1993-11-25 23:36:47 +00:00