Commit Graph

394 Commits

Author SHA1 Message Date
eeh 264b1139cd Prevent the compiler from blowing up on sparc64. From mrg. 2000-09-17 19:55:28 +00:00
msaitoh 3a0bdcde18 check _STANDALONE macro, too. 2000-09-09 00:16:21 +00:00
thorpej 9c5afcb2f0 Move the Alpha _mcount() into a .S file so that it can be
pre-processed, like other Alpha assembly files.
2000-09-05 16:28:30 +00:00
msaitoh 17c5382dc6 compile byte_swap_2.S and byte_swap_4.S 2000-07-21 11:19:46 +00:00
msaitoh 116abff968 support "big endian", too. 2000-07-21 11:19:10 +00:00
bjh21 bf14d56ba8 Add strtoul.c -- if_ea.c needs it. 2000-07-20 20:27:53 +00:00
matt 69a9192fb8 We need strncasecmp.c now. 2000-07-19 03:56:38 +00:00
matt 237e784779 ELFify 2000-07-19 03:48:24 +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
mrg de53718be7 <vm/vm.h> -> <uvm/uvm_extern.h> 2000-06-27 18:01:06 +00:00
msaitoh e94e5fd681 new bcopy.S 2000-06-09 04:42:46 +00:00
msaitoh 431cb8da1c movstrSI*() for gcc -Os 2000-06-09 04:42:24 +00:00
sommerfeld 01d37fc7c9 Add missing trailing newlines. 2000-05-26 23:09:28 +00:00
msaitoh 127c1a76e9 fix the null pointer access bug when arg2 (char **endptr) == NULL 2000-05-25 01:22:41 +00:00
bjh21 6c97e2bd78 Initial commit of arm26 port 2000-05-09 21:55:44 +00:00
thorpej 707b3d59b1 __predict_true() the expressions passed to the assert family, so
as to move the calls to __assert() out-of-line.

Suggested by Bill Sommerfeld.
2000-05-08 23:33:15 +00:00
thorpej b193ffa77c Use __GNUC_PREREQ__(). 2000-05-05 00:20:22 +00:00
msaitoh 48c1343230 asm bcopy() for sh3 2000-04-20 13:52:35 +00:00
itojun 79e89da473 change copyright notice from 3-clause TNF -> 4-clause TNF.
not sure if which we prefer, but the point is to use exactly the same
copyright.  From: matthew green <mrg@eterna.com.au>
2000-04-19 15:16:02 +00:00
augustss 1279e67b6e Kill some more register declarations. 2000-03-30 12:19:46 +00:00
simonb 4ca596f6a0 Don't prototype __assert() if not STANDALONE - <sys/systm.h> has already
included <lib/libkern/libkern.h> to get the prototype by this stage.

XXX: should we just change <sys/systm.h> from
	#ifdef _KERNEL
	#include <sys/systm.h>
	#endif
     to
	#if defined(_KERNEL) || defined(_STANDALONE)
	#include <sys/systm.h>
	#endif
     anyways?
2000-03-29 03:19:52 +00:00
simonb 5ab3ed0c39 Multiple include protection. 2000-03-29 03:07:52 +00:00
simonb 20bd3ffa72 Remove duplicate declaration of __cmpdi2() 2000-03-27 12:00:48 +00:00
itojun 2dc247fc34 make CMSG_ALIGN always synchronize with kernel's idea of ALIGNBYTES.
ancillary data alignment will be ALIGNBYTES, not sizeof(long) - 1, from now.

CMSG_xx will NOT resolve into constant.  if you use CMSG_xx to allocate
arrays, you'll lose.

bump shlib minor for libc.

NOTE: if you are on top of arch with ALIGNBYTES != sizeof(long) - 1,
you need to recompile IPv6-related binaries.  there is no way to guarantee
backward compat in this aspect.  sorry for this.  this should be the last
backward compat breakage for IPv6-related ancillary data manipulation.
(we still have PR 9516 for unix-domain sockets...)
2000-03-02 07:41:49 +00:00
tsutsui 11c8f56d48 Revert STRIPPROG -> STRIP 2000-02-01 05:25:24 +00:00
danw aedaba9bc9 add strtoul 2000-02-01 04:02:59 +00:00
tsutsui e61f177ab1 STRIP -> STRIPPROG 2000-01-19 16:29:54 +00:00
msaitoh b0b4797dfb don't clobber r4 and r5 2000-01-03 02:40:04 +00:00
msaitoh 5517154d15 check _STANDALONE 1999-12-21 21:48:19 +00:00
simonb cfd10575d6 Add strtoul.c and sort sources alphabetically. 1999-11-29 23:24:59 +00:00
simonb 9c807e7a3c Move strtoul.c (via CVS repo copy) to libkern. Also sort prototypes
in libkern.h and sources in arm32/Makefile.inc alphabetically.
1999-11-29 23:12:56 +00:00
simonb 9e5fd23ce5 Copied from arch/arm32/arm32/strtoul.c,v 1999-11-29 22:51:19 +00:00
matthias 87bb3a7b2b make this work again with -mrtd. 1999-11-16 18:16:53 +00:00
thorpej ac3150a13d Add register prefixes. 1999-11-11 01:53:46 +00:00
thorpej 9aeef983e2 Sync w/ libc. 1999-11-11 01:32:10 +00:00
msaitoh 3fd4c8b3b8 add strncasecmp.c 1999-10-21 15:05:08 +00:00
ragge ad78a78402 Include <lib/libkern/libkern.h> after sys/param.h, to avoid warnings
when memcpy et al is static inline.
1999-10-16 19:06:48 +00:00
is e203553a11 Finish support for auto-generated libkern divsi3.S. 1999-09-21 09:43:38 +00:00
is 897dbf6c67 Use an identical source file for the libc and the libkern version of
divsi3.S, conditionally compiling the divide by zero case. This way,
after a change to the one, we can just copy it over to update the other
without creating ... problems. By Chris G.  Demetriou.
1999-09-20 09:22:47 +00:00
is 6b3625a6ad Oops. The overflow code should not have been copied from the userland
version.
1999-09-19 15:58:02 +00:00
is 6cf532dd3d Synchronize with fixed libc version:
If unsigned dividend > INT_MAX, or signed dividend == INT_MIN, be careful
to not overflow the divisor when shifting it to the left.
1999-09-17 11:42:56 +00:00
msaitoh 99ca8c39f5 unused file (we have an asm version) 1999-09-16 15:04:13 +00:00
sommerfeld e8a86fe7eb Include <lib/libkern/libkern.h> instead of <sys/systm.h>.
(the former no longer has mem* prototypes).
Remove the b* vs mem* kludge.
This change allows standalone libkern to build on alpha again.
1999-09-16 00:06:46 +00:00
itojun 65363da25e Merge in NetBSD/sh3 from cvs.kame.net repository.
Tree structure:
- sys/arch/sh3: sh3 generic code
	As commented, in-chip device drivers are put into sys/arch/sh3/dev.
- sys/arch/evbsh3: sh3 evaluation boards (pure sh3 CPU, no fancy external HW)
- sys/arch/mmeye: Brains mmEye, www.brains.co.jp
MI source code includes couple of #ifdef for sh3-coff support.
(sh3 uses coff or elf)

Needs some more improvements, especialy in sys/arch/sh3/conf/files.sh3,
to compile the tree (due to last minute tree structure change).
1999-09-13 10:30:21 +00:00
drochner ff171dfb67 -don't use DEFS.h nor SYS.h in libkern
-remove setjmp.S, it's not useful for libkern
1999-09-10 15:39:04 +00:00
tron 2d8e6b7e97 Add prototype for memcmp() as suggested by Anders Hjalmarsson in
PR kern/8360.
1999-09-10 14:05:40 +00:00
drochner 7148323ba0 sync with libc 1999-09-10 13:21:14 +00:00
chs d1638a0354 sync with libc:
use RODATA() instead of ENTRY() for __ffstab so that it works when profiling.
1999-09-06 19:01:04 +00:00
kleink ed6d5be482 Sync with libc: use _ALIGN_TEXT from <machine/asm.h>. 1999-08-23 09:07:35 +00:00
eeh 4f46ad62b9 Find the udivrem.m4 in the proper directory. 1999-05-09 18:51:36 +00:00
pk 502e9c5778 Add .PATH.m4 1999-05-09 09:16:15 +00:00
eeh 06e7ea9afe Allocating a byte-array and then accessing it as 32-bit integers just won't work
on any machine that has alignment restrictions.
1999-05-09 00:22:46 +00:00
drochner e6b49c7863 move intoa() from libsa:net.c to libkern, turn inet_ntoa() into a macro,
nuke ip_convertaddr()
1999-05-07 14:49:52 +00:00
drochner 192b3c733c Build libraries for kernel/standalone code from within their compilation
directories and use .PATH to lookup the source files.
(Formerly, the libs were built from the source dirs, with MAKEOBJDIR
set to the compilation directory.)
This solves 2 problems:
-"mkdep" and "make" are now consistent about the file lookup, this fixes
 bad interactions with amd reported in PR bin/7374 (Arne Juul) and
 lossage reported by Andrew Gillham ("obj" dirs and relative paths still
 don't work well together)
-kernel compile trees can be moved around without forcing a new
 "make depend" - fixing PR kern/4021 by Martin Husemann
1999-05-07 14:28:50 +00:00
tsubai a5bf1bf4a2 Copy from libc. 1999-05-05 12:36:40 +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
ws 5423093850 Modify syncicache on PowerPC from an inline to a real function.
Support different cache line sizes with the same object code in userland.
While here, move the function to implementation name space.
1999-04-17 21:16:45 +00:00
drochner 2269d36c97 make libkern compile in userland - for testing purposes 1999-04-13 19:00:30 +00:00
drochner b6ab6f5dc1 This was an n_long, not u_long, so u_int32_t is correct. 1999-04-12 17:23:23 +00:00
ross 4634c0e3d4 libkern just got an inet_addr(), but it won't compile, no prototype. Cleanup...
* Add prototype to libkern.h.
* Remove the almost-identical-copy from libsa/net.[ch].
* Change its type back to the (wrong, but harmless) historical one. (u_long)
* Kill the XXX local prototype in nfs_bootparam.c
1999-04-12 01:05:01 +00:00
gwr c0300346be Add inet_addr.c (for nfs_bootparam.c) 1999-04-11 22:08:06 +00:00
simonb 6ce60662b5 Sync with src/lib/libc/string/bcmp.c 1999-04-01 00:30:39 +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
pk fabda9a224 Sync with libc 1999-03-05 09:18:32 +00:00
drochner 66f3455141 make the mipse[lb]->mips translation really work
(the S/// doesn't work as I'm now telling the 3rd time),
put the translation onto a separate line to make it more understandable
1999-03-04 19:46:09 +00:00
jonathan 3eeb52dee0 Makefile ${MACHINE_ARCH} changes for mips{eb,el}, as suggested by
Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
1999-03-03 12:00:18 +00:00
chs 5e59fee53a use RODATA(__ffstab) instead of ENTRY().
this makes profiling kernels work on the sparc.
1999-02-24 16:27:01 +00:00
chs b2546175a6 don't list any *.S files in SRCS multiple times, once is enough. 1999-02-24 16:25:43 +00:00
chs 5a0258140e no need to add ${OBJS} to POBJS here, bsd.lib.mk does it automatically. 1999-02-24 16:22:42 +00:00
simonb faca98eb71 Add memset.S instead of memset.c, and remove __main.c. 1999-02-23 11:06:38 +00:00
hubertf 56f2d188fc RCS ID police 1999-02-15 04:54:34 +00:00
lukem dcab0210a0 convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
1999-02-13 02:54:17 +00:00
pk 14b924800a Can't include libkern.h twice which is what happens if _KERNEL is on.
For now, protect here with _STANDALONE.
XXX - must probably fix sys/systm.h
1999-02-11 15:39:31 +00:00
pk a24b899029 Pull libkern.h in. 1999-02-11 09:13:03 +00:00
bouyer ca083f6095 Sync with libc version. 1999-02-05 16:34:13 +00:00
fvdl 50217a8b50 Check for _STANDALONE as well as _KERNEL to make it compile again. Fold
some includes together in one #if as a result of this.
1999-02-04 15:26:42 +00:00
explorer 24729226e5 sync with userland 1999-02-04 05:36:36 +00:00
matthias 437e1d2f00 sync with libc version 1999-02-01 21:35:36 +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
mycroft ef50bbf452 Sync with libc. 1999-01-22 11:01:32 +00:00
mycroft 6b11ebb854 Sync with libc. 1999-01-22 09:17:47 +00:00
ragge 482b6ca70d #include <machine/asm.h> instead of (nonexistent) "DEFS.h". 1999-01-19 22:54:53 +00:00
castor 2e0007e017 Make bswap32 be the "real" entrypoint and htonl, ntohl aliases. 1999-01-18 01:24:55 +00:00
mrg 24fb50ca7d update from libc; RCSID, register. 1999-01-17 01:30:06 +00:00
thorpej e2a60769a0 Fix an unterminated macro call. 1999-01-15 20:34:31 +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
eeh a5f6f68714 Fixup ffstab naming conflict between locore.s, libkern/arch/sparc/ffs.S and
libkern/arch/sparc64/ffs.S
1998-11-26 19:32:10 +00:00
eeh 8cc6435bf8 Forgot to specify a label for the branch target. Oops. 1998-11-26 19:08:21 +00:00
drochner 337bfd46a5 change handling of libkern:
-sys/lib/libkern builds as library per default (as it was documented all
 the time)
-ports able to LKM set "KERN_AS=obj" explicitely in their Makefiles
1998-10-15 18:46:37 +00:00
leo e325a47307 Fix "unused variable `c'" warning. (From Julian Coleman) 1998-09-14 11:50:59 +00:00
ragge 35662aa6e6 Include <sys/param.h> instead of <sys/types.h>, to get mem* inlines.
(At least on vax)
1998-09-12 08:31:23 +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
lukem c9db84ecc9 distclean is a synonym for cleandir 1998-09-05 15:15:14 +00:00
eeh 26d2d906c7 Some more 64-bit cleanup. Now everything compiles. 1998-08-30 15:32:16 +00:00
enami 47e906e5d9 As a temporary work around to make kernel links again, protect
renaming of quad type library only when !__NetBSD__ && sun && __svr4__.
XXX. Probably need to check __GNUC_MINOR__.
1998-08-30 05:29:39 +00:00
eeh d581aadc3e Some more 64-bit-ification. 1998-08-29 18:16:56 +00:00