Commit Graph

562 Commits

Author SHA1 Message Date
kleink 6348b7d5b5 * On architectures using ELF, and conditionally on those in transition, rename
_ASM_LABEL(cerror) and _ASM_LABEL(curbrk) to _C_LABEL(__cerror) and
_C_LABEL(__curbrk) (or their respective architecture-specific equivalents) to
avoid possible name clashes with identifiers used in user applications.
* Do the same for minbrk on all architectures to avoid a GCC-specific (and
on ELF architectures effectively useless) symbol reference renaming in MI code.
1999-01-14 22:48:18 +00:00
simonb c93135c35a s/vm_offset_t/vaddr_t/ 1999-01-10 08:24:42 +00:00
eeh ff34887c45 More fixes to signal handling code... 1999-01-03 16:22:04 +00:00
mycroft 317ff12487 Slight cleanup. 1998-12-04 09:52:43 +00:00
thorpej efd37a7da8 Warn about references to the compatibility vfork() (i.e. the vfork() with
the 4.4BSD non-shared-address-space semantics), and direct the user to
include <unistd.h> to generate the correct reference.

This warning isn't about an ABI compatibility issue, but the new vfork() is
considerably faster.
1998-12-02 19:29:56 +00:00
thorpej e644246e6a Warn about references to the compatibility() sigaction(), sigpending(),
sigprocmask(), sigreturn(), and sigsuspend(), and direct the user to
include <signal.h> to generate the correct reference.
1998-12-02 01:01:03 +00:00
sakamoto e3a695901c Add frexp.c and modf.c. 1998-11-26 07:50:56 +00:00
tsubai 106908bdb8 Add PIC version. 1998-11-24 11:14:54 +00:00
christos 7c990e0c7b delint 1998-11-14 19:31:01 +00:00
matt cf2842a1b0 Some changes to disassembly easier without causing any performance penalty. 1998-10-20 06:46:19 +00:00
christos f2e15d15fa Fix the non pic version too. 1998-10-16 14:11:53 +00:00
christos 3d8121f3df PR/6285: Tom Ivar Helbekkmo: sigsetjmp/siglongjmp broken after current signal
changes.
1998-10-16 13:28:39 +00:00
kleink d541ca6d80 Need internal names for isinf() and isnan(). 1998-10-13 14:43:36 +00:00
matt c1d0053032 PICify. (e.g. change movl $sym, rX to movab sym, rX) 1998-10-13 00:02:19 +00:00
matt 592306e323 Use __sigprocmask14, fix a few more bugs 1998-10-10 01:50:23 +00:00
matt 99d642287b Actually build __setjmp.S/__sigsetjmp.S for vax. PICifiy the setjmp code.
Fix libm Makefile to handle obj directories.
1998-10-10 00:08:50 +00:00
eeh aba7891e3d Fix libc signal breakage (I hope). 1998-10-08 02:27:58 +00:00
kleink ad0a7279e9 Add *__errno() redirection for _REENTRANT code. Also, some movel vs. movl
consistency.
1998-10-06 19:05:26 +00:00
kleink 9849eb57f8 Declare one of {__errno,errno}, depending on _REENTRANT. 1998-10-06 18:56:25 +00:00
thorpej 4359863000 Update for signal changes. 1998-10-05 02:34:18 +00:00
tsubai 00b455d632 New signal stuff for PowerPC. 1998-10-03 12:30:37 +00:00
matthias ce5916bcb9 __setjmp14.S
fix a fatal bug I introduced when I merged my changes with Jason's.
__sigsetjmp.S
	cosmetics
1998-10-03 10:39:46 +00:00
matthias d2a91d2279 SYS.h
Fix CALL to use _C_LABEL.
gen/Makefile.inc
	setjmp.S and sigsetjmp.S don't have lint stubs. Append them to
	SRCS, not ASSRCS.
gen/__setjmp14.S, gen/__sigsetjmp14.S
	some small optimizations
string/strcat.S string/strncat.S string/strncpy.S
	use _C_LABEL when calling functions
1998-10-01 22:46:35 +00:00
kleink b5fe349eff Add *__errno() redirection for _REENTRANT code. 1998-10-01 19:25:05 +00:00
kleink d8d9d85d13 (Fortunately harmless) typo in previous. 1998-10-01 19:20:44 +00:00
christos d5c25c895a This should be close... 1998-10-01 18:59:16 +00:00
kleink f73ad7167d Add *__errno() redirection for _REENTRANT code. 1998-10-01 09:26:31 +00:00
ragge 7f233b2f7a New libc signal handling stuff. 1998-09-30 18:37:39 +00:00
thorpej c9c3e3bff4 ns32k signal changes. 1998-09-29 20:24:36 +00:00
thorpej ca1e742680 NetBSD/arm32 signal changes. 1998-09-29 20:23:25 +00:00
christos 4d4de54f5f Make the sparc work again; some work from jason, some from me. 1998-09-29 05:55:48 +00:00
thorpej 2af42e072f Signal changes for Alpha. 1998-09-29 03:01:37 +00:00
thorpej adb7eb514d sigaction() that calls the compat syscall (jonathan forgot to commit this). 1998-09-28 19:01:28 +00:00
jonathan 0c47ce2246 mips libc stubs for sig*14 signal API (128bit sigset_t),
plus backward-compatibility  for the old 1.3 libc entrypoints.
1998-09-27 22:59:39 +00:00
christos 2e3d142a37 Add a compat sigaction. 1998-09-26 23:57:15 +00:00
christos 6bacaab8be Fix signal mess. Change old syscalls to use the right signal numbers
and add a versioned copy of sigreturn (from Jason)
1998-09-26 23:49:34 +00:00
christos ccf1e97b10 Add setjmp versioned bits (from Jason).
XXX: Someone needs to make setjmp/longjmp save and restore the signal stack!
1998-09-26 23:46:01 +00:00
thorpej 3d3a3c610c Back out previous change; it was incorrect. 1998-09-14 00:57:51 +00:00
eeh 83116b3d6b Libc fixes, mostly to work around the new signal stuff. 1998-09-13 23:54:44 +00:00
eeh 07c6aca8ad Bring in definition for stack BIAS. 1998-09-12 16:54:14 +00:00
eeh cf009bcc7a Add sparc64-specific libc. 1998-09-11 04:56:19 +00:00
mycroft 2142384565 Assign my copyrights to TNF. 1998-08-15 09:36:04 +00:00
tsubai 7992f14b3a s/asm/__asm/ 1998-08-09 12:43:33 +00:00
perry c6300798a1 add memcmp.S 1998-08-04 03:35:32 +00:00
mark ec628f2561 Update for machine/setjmp.h change (JMPBUF* -> _JB*) 1998-08-04 02:03:08 +00:00
perry 2cc5ae3efa add memcmp.S to libkern. 1998-08-04 01:35:57 +00:00
perry 73e9c49b2b add memmove.S to libkern. 1998-08-04 01:24:59 +00:00
mycroft 982e920022 const poisoning. 1998-07-26 14:13:00 +00:00
jonathan 7e49f8ba22 From Arne Juul <arnej@math.ntnu.no>:
Explicilty reload the mips-ABIcall GOT/$gp  in cerror().
  cerror() gets called from outside libc (e.g., from libposix's rename(),
  and if we don't load $t9, cerror() makes wild references using
  the libposix $gp and coredumps.
1998-07-25 03:01:45 +00:00
tsubai 2d13e5da31 Add #include <sys/syscall.h> for "SYS_sigprocmask". 1998-07-02 18:40:24 +00:00
thorpej d5bc168ba9 Use _C_LABEL() to generate C labels. 1998-07-01 06:44:14 +00:00
thorpej 0c3c6dabb8 Use _C_LABEL() to generate C labels. 1998-07-01 06:24:25 +00:00
tv 131c70b10d Change immediate label references to _C_LABEL(). 1998-07-01 02:16:27 +00:00
thorpej 0b12e1c944 Generate C labels with _C_LABEL(). 1998-07-01 01:28:48 +00:00
christos 49278ef701 s/inline/__inline/ so that lint works. 1998-06-28 20:19:30 +00:00
matthias f7d0254c4b Fix all the bugs I introduced with my last fix... 1998-05-28 22:07:22 +00:00
simonb c578a514a2 Remove single ' from comment to keep cross-assemblers happy; fixes PR 5451. 1998-05-28 13:57:12 +00:00
matthias 4c27158c66 Fix a bug in bug in bcopy/memcpy/memmove that would manifest when
(dst-src < 4) and (dst < src). Credits for finding and diagnosing
this bug go to Ian Dall.
1998-05-27 20:05:43 +00:00
ws a6bbe90471 Use asm.h defines for labels 1998-05-25 15:37:20 +00:00
ws b1009f3dc5 Use asm.h defines for symbols 1998-05-25 15:35:06 +00:00
ws c523f0152f Remove long obsolete copyright (should have been done before initial import) 1998-05-25 15:19:10 +00:00
cgd 5b0ac13bc6 ne64 is not used. #if 0 out its definition, so that its 'static inline'
ness and the fact that it is unused won't combine to cause a warning.
1998-04-24 18:46:53 +00:00
matthias 425a6f2c60 KKENTRY -> KENTRY, fallout from my -mrtd experiments. 1998-04-21 19:57:39 +00:00
matthias b034fd9de6 shutdown is using exect and what we had here made shutdown fail with
a BPT/Trace trap.
1998-04-19 20:14:18 +00:00
matthias 373680d979 Prepare assembler source for -mrtd kernels. 1998-04-03 22:58:08 +00:00
perry 56c01cbd82 change second parm of sysarch() from char * to void * 1998-02-25 21:24:56 +00:00
pk 278a44a644 Need to use PIC_PROLOGUE() since `__ffstab' is now a global. 1998-02-24 22:06:10 +00:00
mycroft a81d3c2db8 Fix omission in last. 1998-02-22 15:24:08 +00:00
mycroft a51494cbe3 Expose ffstab as __ffstab. 1998-02-22 15:11:01 +00:00
mycroft f948529426 Add some more items to KMSRCS. 1998-02-22 09:04:50 +00:00
mycroft 0b15d23837 Copy more files to libkern. 1998-02-22 08:40:37 +00:00
mycroft cf02652abc And rindex.S... 1998-02-22 07:21:32 +00:00
mycroft 6b7f2d0f92 And index.S... 1998-02-22 07:20:24 +00:00
mycroft c8cf6620bb Copy strchr.S and strrchr.S as well. 1998-02-22 07:01:11 +00:00
mycroft e1e9dd27c5 Copy up bcopy.S and memcpy.S. 1998-02-22 06:46:55 +00:00
mycroft 96b33a9cda Copy more files to libkern. 1998-02-22 06:37:54 +00:00
thorpej 4a374620e0 Fix exect(3). 1998-02-03 19:34:50 +00:00
thorpej 91969428f9 Clean up _SYSCALL_NOERROR() a bit. 1998-02-03 19:33:58 +00:00
mycroft cb5f577939 Need float.h for prototypes. 1998-02-03 01:30:43 +00:00
cgd ec1f804952 add back RCS Id which I accidentally deleted. 1998-01-22 20:05:20 +00:00
cgd 193c1d2147 (1) make sure targets are built in a parallel-make-safe way
(2) make sure softfloat.po is compiled with the right profiling
    flag (-pg), and softfloat.so is compiled with the right
    PIC flags (${CPICFLAGS}).
1998-01-22 07:17:16 +00:00
cgd ecb2fd7aad define INLINE to be "static inline" rather than "extern inline", so that
if this code is compiled without optimization the not-inlined functions
will be included (statically) in the object files, and now show up
as undefined references.
1998-01-22 07:14:17 +00:00
perry a3a46419b5 RCS Id Police. 1998-01-09 03:45:03 +00:00
perry 4e067afcb1 RCS Id Police. 1998-01-09 03:15:09 +00:00
perry fbdb247796 RCSID Police. 1998-01-05 23:54:03 +00:00
thorpej bedc7b48df Add syscall stubs for __vfork14(). These are basically copies of Ovfork.S
with the syscall numbers changed.

Since 4.4BSD vfork(2) did not share address space, Ovfork.S could be changed
to be identical to fork.S (modulo syscall numbers).  __vfork14.S, however,
needs to remain separate since with a shared address space, the stub needs to
pre-decrement the stack and do an indirect jump to the return address, so that
the shared stackframe is still there when the parent returns.  (Obviously,
this does not apply to systems which to not build stackframes on leaf calls.)
1998-01-04 20:58:08 +00:00
matthias 8c90828457 Introduce ASSRCS. This is set to all the ns32k md assembler source files.
arch/ns32k/Makefile sets SRCS, LSRCS and DPSRCS from this.
1997-12-07 00:19:16 +00:00
matthias 1469ba0767 No longer in use. 1997-12-07 00:17:53 +00:00
thorpej f22bd47b81 Use __sigaltstack14(), not sigaltstack(). 1997-12-05 02:09:49 +00:00
thorpej 6efbfe5247 Make setjmp() work again after the changes to sigaltstack(). 1997-12-05 02:06:27 +00:00
tv eb96023de7 Quick fix to repair runtime link problem with libc - "SYS_sigaltstack
undefined".  The sigaltstack structure layout didn't actually change on
the sparc, so just change the syscall name.  A better fix would probably
be to replace the direct system call with a function call to the libc
sigaltstack().
1997-12-04 21:00:18 +00:00
mark 0053558a70 Fix a glaring bug in the assembly stubs for memcpy() and memmove() that
meant the src address was being returned rather than the dst address.
Spotted by Chris Demetriou.
1997-11-22 03:27:12 +00:00
thorpej cb96bff387 LintAlpha* have been removed. 1997-11-08 00:40:08 +00:00
cgd 435c105d59 lint stubs for assembly routines. 1997-11-05 23:37:06 +00:00
cgd 4d7e773266 A foolish consistency... gen, net, and string all get MD sources
specified by including a Makefile.inc from the appropriate MD directory.
stdlib doesn't do that, but there's no reason that it shouldn't (and
it'd be nice to eliminate the 'if's from the MI stdlib Makefile.inc).
1997-11-05 22:59:37 +00:00
cgd 0f191bd9d2 remove these, they are no longer necessary or appropriate 1997-11-05 22:33:28 +00:00
is eae488f7bb Fix typo, which resulted in always compiling the M68040/M68060-version
of ldexp.
1997-11-04 15:23:23 +00:00
phil 2c764d53fa Make it compile with WARNS=1. (I'm not sure where the prototype really
should be, but it does now compile.)
1997-10-27 05:28:46 +00:00
phil d27ec1e50a Get it compiling again in the WARNS=1 environment. 1997-10-24 06:26:39 +00:00
lukem 97ba901942 use CPPFLAGS instead of CFLAGS, ${COMPILE.c} instead of ${CC} ... -c 1997-10-22 23:21:46 +00:00
jonathan 8053fbfe3c Pull up endian-independent changes from locore, userland bcopy.S. 1997-10-20 09:31:37 +00:00
jonathan d9af5eb2f7 Pull up ambi-endian diffs from kernel bzero(). 1997-10-19 01:19:58 +00:00
jonathan 2698f7d137 Pull up endian diffs from kernel bcopy(). 1997-10-18 05:21:44 +00:00
jonathan 82526d56fd Prototype __flt_rounds(). 1997-10-18 02:43:06 +00:00
mark a2b5e07612 Include memmove.S in the list of sources. 1997-10-18 02:28:25 +00:00
mark fd06e9f4e6 Use the ASENTRY() macro for the declaration of cerror. 1997-10-17 19:57:17 +00:00
mark fb4d5f58af Fix extra 'S' character typo that resulted in the condition codes being
incorrectly internally on certain divides.
Handle the case where the internal result appears negative. This condition
can occur when dividing MIN_INT by certain values.
Raise an exception on divide by zero.
1997-10-17 18:43:47 +00:00
jonathan aae966edfa Cacheflush support code for mips CPUs.
Used by GCC's lexical-closure trampoline code.
1997-10-17 06:29:02 +00:00
mark a5efbaaf3f Fix -Wall compiler warnings. 1997-10-13 21:28:53 +00:00
mark e30acb582b Build softfloat support as standard. 1997-10-13 21:26:58 +00:00
mark 4b5476b492 Fix compiler warnings. 1997-10-13 21:24:15 +00:00
mark 309d2271d4 Implement soft-float support using the softfloat library from John Hauser. 1997-10-12 21:18:01 +00:00
is 31c3c1a2b3 Most calls of ldexp() won't be with a first parameter of 0.0. Don't penalize
them for a slight optimization of the zero case.
1997-10-09 20:06:18 +00:00
lukem 2a55b0f192 rcsid police 1997-10-09 10:07:40 +00:00
jtc c8f77c0b8b Fix tipo inherited from old version of TNF copyright template. 1997-10-09 07:25:45 +00:00
mark 1f73d0c21a Added assembly files _memcpy.S memcpy.S memmove.S bcopy.S memset.S bzero.S 1997-10-06 00:40:31 +00:00
mark 6740365e8e Implement bzero() as a stub that calls memset(). 1997-10-06 00:39:25 +00:00
mark 45306416a8 Implement an assembly version of memset(). 1997-10-06 00:38:33 +00:00
mark 4cb1dd25c8 Implement standard libc memory copy/move functions as stubs onto the
assembly _memcpy() routine.
1997-10-06 00:37:51 +00:00
mark 65021679a3 Implement an assembly memory copy routine. 1997-10-06 00:35:50 +00:00
mark d581bfa372 Use machine/asm.h instead of DEFS.h
If SOFTFLOAT is defined provide glue to the softfloat functions.
1997-10-06 00:26:11 +00:00
mark e416694cf0 If SOFTFLOAT is defined provide glue for the softfloat rounding functions. 1997-10-06 00:23:54 +00:00
mark a0e35b1248 Use fpgetround() to get the current rounding mode. 1997-10-06 00:22:40 +00:00
mark 1302ae6654 Minor code cleanup.
Use machine/asm.h instead of DEFS.h
1997-10-06 00:20:28 +00:00
mark 9c99854d71 Minor code cleanups. 1997-10-06 00:18:30 +00:00
mark 591d03a899 Replaced by divsi3.S 1997-10-06 00:16:01 +00:00
mark d33af6fbb2 Replaces the divide routines in div.S 1997-10-06 00:15:32 +00:00
mark 5ecc353c4d Added assembly file divsi3.S 1997-10-06 00:12:24 +00:00
mark 4e7948694a Rewritten to support new jmpbuf format describe in machine/setjmp.h.
Use magic numbers to validate the buffers on a longjmp().
Don't save/load the fp registers if SOFTFLOAT is defined.
1997-10-06 00:10:32 +00:00
mark e08cd408b1 Added PIC support where required.
Cleaned out and dead / redundant code.
1997-10-06 00:07:09 +00:00
mark 9d64c268b2 Added assembly versions of the network <-> host byte order functions. 1997-10-06 00:03:13 +00:00
mark c465276e26 Added assembly versions of the network <-> host byte order functions from
Neil Carson <neil@causality.com>
1997-10-06 00:01:08 +00:00
mark ee681780be Removed redundant .text and .align directives. 1997-10-05 23:58:24 +00:00
mark 63025a1fe6 No longer needed, so axe it. 1997-10-05 23:56:49 +00:00
is e6cb27b508 ieee.h and ldexp.c taken from the powerpc port, for the benefit of
68040 and 68060 owners.
With ``make M68040=1'' or ``make M68060=1'', we build a libc where the ldexp()
doesn't use excessive amounts of system cpu time.
Without any of those defines, the normal assembler version using FSCALE is
included, for the benefit of M68020 and M68030 users, or M68040/M68060 users
where the ldexp performance is no bottleneck.
[Its not yet worked out how to include both library versions in a binary
distribution, but you can build your own from source now if you need it.]
For details, look at PR 3105.
1997-10-02 21:47:47 +00:00
jonathan 68a9b35134 Do a .cpload if compiling with PIC.
Examining  the .so output from binutils 2.8 and 2.8.1 shows the
	li.d	$f2, 4503599627370496e0
is (incorrectly?) emitted as GP-relative loads when PIC is in effect.
1997-08-19 20:49:47 +00:00
jonathan cbb2b5d0fb Substitute Mach 3.0 kernel bcopy() which is unrolled for aligned copies. 1997-08-09 02:02:08 +00:00
jtc 9f3b240e5c Fix files using old TNF copyright notice 1997-07-30 23:50:37 +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
phil b94cad931e Add missing quote (") at end of _RCSID argument. 1997-07-21 06:01:55 +00:00
thorpej 697496a1e7 Pull in __flt_rounds() prototype. 1997-07-18 05:10:02 +00:00
thorpej ef909f429a Pull in __flt_rounds() prototype. 1997-07-18 00:30:30 +00:00
kleink c5f0b6148d Fix typo from last commit: `bnlsr' vs. 'bnslr'. 1997-07-16 16:11:48 +00:00
christos 1394f01b4a RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in
<machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS
define not LIBC_SCCS
1997-07-16 14:37:13 +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 43d6f49e0a Add missing math.h include
Fix RCSID's
1997-07-13 18:43:18 +00:00