Commit Graph

26 Commits

Author SHA1 Message Date
cgd b7ad250ab1 copy from lib/libc/arch/mips/gen 2001-02-27 19:45:26 +00:00
thorpej 1cfe0850f5 Add a strcasecmp(), modified from chopps's strncasecmp(). 2000-11-01 19:37:18 +00:00
jeffs db1bb008f9 Set return value correctly for memcpy/memmove. 2000-10-10 20:29:03 +00:00
enami 84606936fb Fix an obvious typo in comment introduced by previous commit; the instruction
now compares a0 against a1 + a2, not a0 + a2.
2000-07-18 01:20:24 +00:00
jeffs efabca31b5 Make memcpy() the favored interface an swizzle the args for ovbcopy. Also
move bcopy XLEAF here from locore.S.  For 64b clean compilation add a
ld/sd section to the block copy.
2000-07-17 07:37:50 +00:00
simonb cfd10575d6 Add strtoul.c and sort sources alphabetically. 1999-11-29 23:24:59 +00:00
simonb 955a0aba21 Until <bsd.lib.mk> is fixed, don't try to guess whether or not to
use abicalls in kernel source.
1999-04-20 00:45:24 +00:00
simonb 5e5bf63bc1 Don't add .abicalls if NO_ABICALLS is defined even if ABICALLS is defined. 1999-03-17 13:31:43 +00:00
jonathan 4c6134d7c8 Use merged memcpy()/memset() based on old bcopy rather than C-coded memmove.
TODO: change register usage so memcpy()/memmove() is default, put test
for back-copy before memcpy() and back-copy loop after memcpy().
1999-03-15 07:04:04 +00:00
jonathan e22fd3b59d Fix bug in construction of word-length version of 'c'.
Preserve input string and return it as per userlevel spec.
1999-03-15 06:34:10 +00:00
simonb faca98eb71 Add memset.S instead of memset.c, and remove __main.c. 1999-02-23 11:06:38 +00:00
jonathan 9bd63525f8 memset, derived from old kernel bcopy.
Uses negative register offsets in memory writes, to avoid r4k silicon bugs.
1999-01-28 03:08:57 +00:00
castor 2e0007e017 Make bswap32 be the "real" entrypoint and htonl, ntohl aliases. 1999-01-18 01:24:55 +00:00
bouyer dc306354b0 Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
1999-01-15 13:31:15 +00:00
castor cfdc52bfa9 Break out utility functions from locore.S 1999-01-15 08:44:27 +00:00
jonathan 008816ea4f Changes to sys/arch/mips from ARC port, from Noriyuki Soda <soda@sra.co.jp>.
Adds (most) support for ARC platform to port-independent mips code.

Some changes (e.g., clean up of overlapping CPU/FPU ids) inspired by
comparison to the OpenBSD 2.1 codebase of Soda's ARC port.

Open issues:
 * Still no support for r4600 or mipsIV CPUs with two-way L1 cache.
   Code derived from Per Fogelstrom's OpenBSD source  doesn't work
   on mips3 pmaxes with L2 cache.

 * Still some port-specific  #ifdefs, for interrupt enable and
   pmax L2 cache-size.  Needs more thought, but overlaps with
   work-in-progress by Tohru and Tsubai on spl()s and related stuff.
1998-09-11 16:46:31 +00:00
tls 8a146cd406 update for b->mem change in sys/kern; now we need memcmp and memset, not just memchr. AFAIK, memcpy is provided by the compiler or by locore on this platform. 1998-08-20 17:56:22 +00:00
cgd 4369378a6c add rules like those in libc to build strchr() and strrchr() (the latter
is being added to libkern by this commit).  remove strchr.c from
archs' Makefile.inc files to go along with this.  (If an arch has
a .S version, it should be copied down and added to the apropriate
Makefile.inc.)
1998-01-21 21:23:18 +00:00
chuck cf924e3bc0 add memchr() to libkern 1997-10-24 15:32:24 +00:00
bouyer 6ab3092b11 Add byte-swapping functions (bswap16, bswap32, bswap64) to libkern.
Only assembly version for i386 bswap16 and bswap32 for now (bswap64 uses
bswap32). Contribution of assembly versions of these are welcome.
Add byte-swapping of ext2fs metadata for big-endian systems.
Tested on i386 and sparc.
1997-10-09 15:42:19 +00:00
cgd d867ed50cc add strchr() to libkern. strchr.c copied from libc's "index.c", but with
appropriate definitions so that it'll build strchr(), and so that it builds
correctly in libkern (needed to #define NULL).
1997-01-18 02:33:38 +00:00
cgd bdbfa48c0b Add machine-independent assertion-checking support. macros are:
assert()	which always does assertion checking
			unless "NDEBUG" is defined.

	KASSERT()	which does assertion checking if DIAGNOSTIC
			is defined.

	KDASSERT()	which does assertion checking if DEBUG is
			define.  This macro exists for compatibility
			with existing ports' assertion checking macros.
			(Assertion checking is not typically an
			"expensive" operation, and DIAGNOSTIC should be
			used for inexpensive consistency checks.)
1996-08-27 00:44:20 +00:00
cgd e70b1375c9 add strncasecmp.c to ports' libkern Makefile.inc's. When adding a new
source file to libkern, it should be added to _ALL_ ports makefiles if
it is machine-independent and used by machine-independent code (in
this case adosfs).  (There are several arguments that say that
strncasecmp should not be in libkern at all, and i think they're
good ones, but as long as ADOSFS needs it to link, it has to be here
for all architectures.)
1996-04-13 01:17:27 +00:00
cgd aa9eacdd59 new RCS ID format. 1994-10-26 06:39:02 +00:00
glass 48967285da fix typo: scan.c -> scanc.c 1994-06-15 15:27:42 +00:00
glass 78bf21476b works in bootstrapping caseee 1994-06-03 03:44:41 +00:00