Commit Graph

938 Commits

Author SHA1 Message Date
thorpej 4cd75d0d0a Add a __clone(3) entry point. 2001-07-17 00:33:04 +00:00
matt 5feec23305 Changes needed for ARM ELF shared library support. 2001-07-16 05:50:05 +00:00
eeh b4b1b3f3d7 Replace bzero.S and bcopy.S with memset.S and memcpy.S to make the makefiles
happy.
2001-07-07 04:55:21 +00:00
eeh 227671f79e Fix more boundary issues. 2001-07-05 19:09:24 +00:00
eeh 8617fb9c54 Fix some boundary condition issues. 2001-07-05 06:29:49 +00:00
eeh 81fff01d8c Re-enable block insns for cahe issues. 2001-07-04 20:18:30 +00:00
eeh 093cf4f3b1 Re-enable block insns since they don't allocate in the caches. 2001-07-04 20:16:17 +00:00
eeh 64c6d98716 Disable slower VIS version. 2001-07-04 05:51:06 +00:00
eeh a6d4aabed4 Fix return value and fetches beyond the source range that could cause
segmentation faults in some cases.  And disable the VIS version which
seems to be slower.
2001-07-04 05:44:56 +00:00
eeh c7b881788f Oops. Fix typo. 2001-07-01 22:48:30 +00:00
eeh 0abcba55b7 I seem to have stumbled on an even faster bcopy implementation.... 2001-07-01 22:19:51 +00:00
ragge d6a6aa8773 These are too simple to not have in assembler. Also shrunk the libs with
~1k of unneccessary code :-)
2001-07-01 13:31:18 +00:00
eeh 4acdda21fd Add an optimized asssembly bcopy/memcpy. 2001-06-30 00:10:48 +00:00
atatat c39d205545 fix a grammatical error error 2001-06-28 05:25:04 +00:00
kleink b7ef7f807f Use a bzero-based assembly language implementation for memset();
inspired by the recent sparc64 change.
2001-06-23 08:38:43 +00:00
eeh 6541f113b9 Add an assembly version of memset(3). 2001-06-21 22:41:55 +00:00
fvdl 10f59d7bba Initial commit of x86-64 specific parts of libc. 2001-06-19 00:25:01 +00:00
simonb aebecd5c42 Compile in soft-float support if MKSOFTFLOAT != "no". 2001-06-18 17:05:32 +00:00
chs 77b0e1dfba adjust the PIC case for ERROR() to handle __cerror being at a larger offset
than will fit in the immediate field of the LDX instruction.
2001-06-15 01:09:50 +00:00
fredette eba34d8c90 Don't compile softfloat or integer support routines on 68000
machines, they have this support already in libgcc.
2001-06-13 18:05:32 +00:00
kleink 2262305e20 Fix renaming botch in previous. 2001-05-29 23:59:19 +00:00
kleink 3529d6d10f Add missing internal names and weak aliases to assembly versions. 2001-05-29 13:03:01 +00:00
tsubai bfc2a06464 Correct input and output of asm. 2001-05-25 12:28:12 +00:00
simonb 937389b6ee Handle soft-float case, code from David Querbach of Real-Time Systems Inc. 2001-05-25 12:17:45 +00:00
simonb 42102f1084 Handle soft-float case, from the arm flt_rounds.c. 2001-05-25 12:14:05 +00:00
simonb 3f04a27329 Softfloat support files for PowerPC. 2001-05-25 11:38:57 +00:00
fredette d74323a8be On m68000, all code is compiled softfloat, so functions
that return floats must do so in integer registers, as the
pre-SVR4 ABI code did.  So in these functions we ignore
__SVR4_ABI__ if __HAVE_68881__ is not also set.
2001-05-18 15:13:04 +00:00
fredette ca081b169d Added. These are part of the soft-float support on the 68010. 2001-05-17 21:46:26 +00:00
fredette 9a2dd99d75 Use the EXTBL macro where we want the extbl instruction.
On the 68010 this expands to an extw/extl combination.
2001-05-17 21:28:00 +00:00
fredette 77f5240b49 On the 68010 only, assemble a different version of
this function, since the 68010 doesn't have bit
instructions.
2001-05-17 21:26:06 +00:00
fredette 3085bd52b8 On the 68010, we are forced to do bytewise compares
and copies if the two addresses aren't of the same
evenness.
2001-05-17 21:24:08 +00:00
kleink 95fa77ab80 Make this work for PIC (as opposed to pic) without taking chances of fitting
__ffstab into a GOT13 relocation; from Eduardo Horvath.
2001-05-13 20:03:45 +00:00
eeh 4fd3b89e58 Removed unused PIC setup code. 2001-05-13 20:02:13 +00:00
msaitoh aa754324f7 style fix (no functional change) 2001-05-11 19:58:06 +00:00
kleink 6814785547 Make the END() argument match the entry name. 2001-05-07 17:19:17 +00:00
ross b25c2304f3 I have no idea why this syscall wrapper does some very un-unix-like
argument prefrobbing, in particular, it computes max(addr, __minbrk)
and uses that. The code is like this even in the ancient libc/i386 tree,
back to the earliest rev 1.2. I did not see it Lite 1, but I'm not totally
sure what the random site I found was serving up.
*
* However, I do know that it should use jb and not jl.
*
2001-05-06 19:27:07 +00:00
kleink d493d86cac Shameless hack to reference end when using a.out and _end when using ELF. 2001-05-05 17:56:58 +00:00
kleink f56935aca7 Shameless hack to reference end when using a.out and _end when using ELF. 2001-05-05 17:46:37 +00:00
ross 1b16e0e8ee tweak barrier ops some more 2001-04-26 04:18:32 +00:00
ross 18274acbcd Delete the trapb ops bracketing mf_fpcr, they aren't needed.
Change the trapb ops bracketing mt_fpcr to excb ops.
2001-04-26 03:23:18 +00:00
ross 0c3b624af9 Complete rewrite. Call the new sysarch(ALPHA_FPGETSTICKY, ...). 2001-04-26 03:21:39 +00:00
ross 91a26b1052 remove the trapb ops bracketing mf_fpcr, in this one case they aren't needed 2001-04-26 03:19:10 +00:00
ross 885770193a minor cleanup 2001-04-26 03:16:58 +00:00
simonb 8b33f6cba9 Fix typos in an (unused) function return type. 2001-04-26 01:00:30 +00:00
marcus 059c35bcd9 Renamed reference to compat syscall to conform to new naming scheme. 2001-04-09 16:08:41 +00:00
marcus 84308157cc Added missing _C_LABEL to errno reference. 2001-04-09 16:07:34 +00:00
bjh21 d1fdb92ff8 Remove arm32-specific files from libc. NetBSD/arm32 now uses the generic
ARM sources in lib/libc/arch/arm.
2001-03-13 19:31:36 +00:00
bjh21 6964bdfcad Re-instate __fixunssfsi() and __fixunsdfsi(), but only for arm32 with a.out
binaries, because libc's provided them there forever.
2001-03-08 18:56:19 +00:00
bjh21 328780b294 Leave selection of APCS mode to the compiler -- future versions of cpp will
get it right.

Always include new softfloat code -- it seems OK on arm32.
2001-03-07 00:49:48 +00:00
cgd 2eb1943575 make these more amenable to being copied into libkern. (Gee, why wasn't
this done before?  it's not like it was hard...)
2001-02-27 19:44:54 +00:00
cgd 181fee6ea8 pull up <machine/endian.h> and use BYTE_ORDER to decide endianness,
rather than MIPSEL and MIPSEB definitions.
2001-02-27 18:59:16 +00:00
bjh21 fe6fa58436 Add support for ARM VFP-format doubles, conditional on __VFP_FP__. 2001-02-21 18:09:25 +00:00
msaitoh 6e979b59fa _C_LABEL() 2001-02-16 20:03:09 +00:00
msaitoh 3c31811206 don't profile (use NENTRY() and ALTENTRY()) 2001-02-14 21:04:17 +00:00
msaitoh 43f68615ec use _C_LABEL() 2001-02-14 11:32:44 +00:00
eeh e21d458f48 Don't flush the zero-ed data from the cache. 2001-02-10 23:35:41 +00:00
wiz d1112b63ff De-lint. Reviewed by christos. 2001-02-09 14:16:12 +00:00
wiz 4d8cd9d9e4 Add some casts to make lint shut up. Reviewed by christos. 2001-02-08 18:28:07 +00:00
bjh21 0347c41a17 Don't declare functions that are provided elsewhere in libc. 2001-02-08 13:22:15 +00:00
scottr ed472989a6 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.
2001-02-05 00:17:22 +00:00
scottr 7b10d18078 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.
2001-02-05 00:17:21 +00:00
wiz 37606c1593 delint (variable is only used for size, so make if size_t instead of int). 2001-01-26 13:20:32 +00:00
bjh21 3da8f9bff4 Correct licence to current TNF one. 2001-01-23 19:07:34 +00:00
itojun 9870327734 fix syscall() and __syscall(). r0 has to be set to SYS_syscall or
SYS___syscall, respectively.  otherwise sys/arch/sh3/sh3/trap.c will
look at the wrong argument.
2001-01-17 05:15:02 +00:00
bjh21 da666fcde6 Replace boiler-plate code sequences with macro invocations from SYS.h. 2001-01-09 21:19:33 +00:00
bjh21 4cb97060e6 Use SYSTRAP() everywhere rather than coding SWI instructions directly. 2001-01-09 19:47:27 +00:00
bjh21 f5fadef6d9 Add some explanatory comments. 2001-01-09 19:30:38 +00:00
lukem e0cb66f652 rcsid & whitespace police 2001-01-08 15:21:37 +00:00
fvdl 52d1f12742 Make these actually work (fixes PR 11914). 2001-01-08 14:36:41 +00:00
itojun 6de175eeb8 __syscall is now mandatory 2001-01-04 08:53:50 +00:00
matthias c7a662aae7 Cosmetics. Use _ASM_LABEL for cerror. 2000-12-29 23:16:42 +00:00
matthias beff37f457 Implement 64 bit version of syscall. 2000-12-29 23:16:18 +00:00
bjh21 5aefcfdc06 Create shared ARM source for libc, and move arm26 port over to using it.
The code is (almost) a direct copy of the current arm26 sources.
It's identical to the current arm32 sources, with the following exceptions:
 - _C_LABEL is used on references to C labels from assembler.
 - Function returns in assembler have APCS-26 versions in #ifdef __APCS_26__.
 - It uses SoftFloat 2a rather than SoftFloat 1a.

The first two of these should be inconsequential.  I believe that SoftFloat 2a
should work on arm32 and be backward-compatible with existing code, but this
is not obviously true.  For now, arm32 remains using its own bits of libc.
2000-12-29 20:13:44 +00:00
bjh21 a88be20997 We no longer have _C_FUNC: Use _C_LABEL instead. 2000-12-29 13:39:39 +00:00
bjh21 40906c10a4 Sync with arm32: remove ovbcopy entry point. 2000-12-28 18:33:54 +00:00
bjh21 9d5c6f8887 RCSID cleanup. 2000-12-28 18:27:24 +00:00
tsubai 7ec5b1f483 Fix weak alias. 2000-12-16 01:40:38 +00:00
bjh21 148c9ed7ee Resync with arm32:
byte_swap_2.S 1.4
  byte_swap_4.S 1.3
2000-12-14 20:47:26 +00:00
mycroft e4a2f51cc9 Adjust to not use ALTENTRY(). 2000-12-14 20:17:32 +00:00
mycroft ffb377199e Make this link right again! 2000-12-14 20:03:42 +00:00
bjh21 f213bb8702 Use _C_LABEL rather than _C_FUNC. 2000-12-14 19:40:22 +00:00
bjh21 d0ec536a8d Sync with arm32. 2000-12-14 19:27:34 +00:00
simonb 1bb9a3396c Remove all the .abicalls assembler directives - "SYS.h" already has that. 2000-12-13 23:29:06 +00:00
simonb 488ef36c45 Another bare minimum __syscall. 2000-12-13 23:18:40 +00:00
scw e86cd7609a The bare minimum to get m68k libc working again... 2000-12-13 21:46:23 +00:00
martin 772baecb3a Add simple __syscall.S to make libc compile on sparc64 again. 2000-12-13 20:25:04 +00:00
pk efd94d5369 Add required __syscall.S stub. 2000-12-13 10:29:40 +00:00
matt b0bf2adc11 This should convert to syscall but that's too hard. So punt. XXX 2000-12-13 07:50:48 +00:00
mycroft 344549013e Add the obvious, trivial __syscall() stub. 2000-12-13 07:49:17 +00:00
matt 3a17b3526a Don't need __syscall.S here either. 2000-12-13 07:44:34 +00:00
matt 44e25a6200 Add __syscall.S back to sys/Makefile.inc. Remove from arch/i386/gen/
Makefile.inc.  If your architecture doesn't have __syscall.S, *add it*.
2000-12-13 07:42:47 +00:00
matt 0e233d1597 Add a VAX version of __syscall. XXX Doesn't handle if syscall number is
> 0xffffffff or < -0xffffffff.
2000-12-13 07:34:54 +00:00
matt 9a6a3ec1b5 Add __syscall.S to arch/i386/gen/Makefile.inc along with all the other
sys .S files.  Remove from arch/i386/Makefile.inc since it doesn't belong
there.
2000-12-13 07:14:43 +00:00
enami 44db4d16cc KMSRCS is different from SRCS. Put __syscall.S in latter. 2000-12-13 07:05:55 +00:00
simonb 0e35eedd7e Move __syscall.S to the arch specific Makefile.inc's where it is
implemented.
2000-12-12 22:38:42 +00:00
mycroft 0878972b4c Adjust for changes in asm.h. 2000-12-12 07:35:39 +00:00
mycroft 62664869a2 Add trivial implementation. 2000-12-12 07:10:25 +00:00
mycroft 3340188285 Minor cleanup. 2000-12-12 07:10:14 +00:00
is aaed06d422 Identical on m68k. 2000-12-11 16:17:18 +00:00
mycroft 731305d114 Handle __syscall() in user-level code for i386. 2000-12-10 21:27:37 +00:00
mycroft 10bfc7b1b3 Use the SYSTRAP() macro more uniformly. 2000-12-08 22:57:57 +00:00
scw c762ba1426 Use A1 to save the return address, since A0 is no longer preserved across
system calls.
2000-12-07 14:13:43 +00:00
scw 4cc90c99f2 The last change broke things if SYS___vfork14 returned an error; fix it. 2000-12-07 14:12:49 +00:00
is 0bffee4893 The mapping is, effectively, an exclusive or with 0x01. Replace.
Savings: 10 bytes of code/constant data, 1 machine instruction (including
one memory access).
2000-12-04 12:02:08 +00:00
scw 6751bb4f81 Save the return address in %a1 across the vfork syscall instead of %a0. 2000-12-02 17:03:06 +00:00
scw c586587e47 Restore %a0 after the call to sigprogmask(2) since an ELF kernel
will stomp on it due to SVR4 ABI compliance...
2000-12-02 16:25:39 +00:00
is a4fe32b56e Another change by Hiroshi Horimoto. 2000-11-28 15:23:09 +00:00
scw c81e32f3dd Add missing register prefixes. 2000-11-28 11:37:20 +00:00
scw 4dab4ff2ca Add a missing `%' register prefix. 2000-11-28 11:34:14 +00:00
is a3a6f324e6 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.
2000-11-27 22:35:30 +00:00
eeh 5d73d71676 Fix modf() (I hope. Can't be any worse than the old version.) 2000-11-01 23:32:41 +00:00
jeffs 4912e50a59 Make memcpy and memmove use bcopy assembly for mips. Tweak forward copy
code for backward copy to make overlap copy faster.  This happens in
some SW like sleepycat db.  Use temp labels in order to not confused
the profiling tools.
2000-10-10 21:51:54 +00:00
kleink a253819635 Whitespace botch in previous, noticed by Leo Weppelman and Thorsten Frueauf. 2000-10-02 14:52:39 +00:00
kleink bea4776498 _SYSCALL() argument order botch in previous. 2000-10-02 14:51:57 +00:00
kleink 82fd76bb06 Need an internal name for pipe(2). 2000-09-28 08:38:53 +00:00
msaitoh f9b799b651 check LIBC_SCCS 2000-09-13 22:32:25 +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
eeh d3312c2719 Fix layout of fields in jmp_buf. [N.B. we could make JMP_BUFLEN 9 if we want.] 2000-08-28 00:45:59 +00:00
joda 991b448f39 add newline at end of file, to please (the quite buggy) mkid 2000-08-22 12:24:17 +00:00
ad 136f4e3b32 %edx is free; use it instead of %ebx. 2000-08-07 14:46:52 +00:00
matt 09f029058b Fix some ELF/a.out lossage 2000-08-07 03:18:04 +00:00
tsubai 7272e1b36f s/minbrk/_C_LABEL(__minbrk)/. 2000-08-04 09:19:39 +00:00
tsubai 511556bf86 Change comment character from '#' to '!'. (binutils-2.10 doesn't like '#') 2000-08-04 08:47:03 +00:00
eeh 9c2bf87977 Need to reserve a full 64-bit stackframe, not a 32-bit one. 2000-07-26 00:53:50 +00:00
mycroft 01a39929fc Store the whole 64-bit pointer... 2000-07-25 20:15:40 +00:00
mycroft fb41c8728c Use cpp comment style. 2000-07-25 15:14:45 +00:00
mycroft c54917029b Make __dtoul() actually DTRT. The calling convention was totally wrong, and
the `big' value should be 2^63, not 2^31.
Also, nuke __fixunsdfsi(), since this is never output by the sparc64 compiler.
2000-07-25 04:26:12 +00:00
mycroft 4272204d8d Offset the %i2 stack slot from %sp, not %fp. Otherwise we may modify the
caller's registers!
2000-07-24 15:36:49 +00:00
mycroft fc590aafb4 There's no good reason not to assume a 64-bit stack here. 2000-07-24 15:24:55 +00:00
mycroft eded30220a Don't bother saving %f16-%f31, since we don't use them. 2000-07-24 07:30:54 +00:00
mycroft b3e75eb4ed _errno -> __errno 2000-07-24 00:11:10 +00:00
mycroft e740400671 Just use a store/load pair to get the pattern into the FP reg. This eliminates
a bunch of cruft and avoids using a v9a instruction.
In addition, eliminate 8 of the fmovda's, which we are not using the result of
anyway.
Net result is that this should be faster in all cases.
2000-07-23 20:34:07 +00:00
eeh 32ceb997a8 Fix stack BIAS issues. 2000-07-23 07:12:22 +00:00
eeh e507cc60e6 Update some more assembly code for PIC issues. 2000-07-21 03:14:15 +00:00
eeh 067b7521b5 Fix PIC bugs. 2000-07-18 22:38:11 +00:00
bjh21 3b9cd873cb Revert previous change -- turned out I'd got my build environment in a twist. 2000-07-15 15:07:34 +00:00
bjh21 985033a7a6 Add fixunssfsi and fixunsdfsi. These are provided by libgcc2.c in GCC 2.95,
but not in EGCS.

This version of fixunssfsi is almost exactly the arm32 version.  fixunsdfsi is
mostly based on fixdfsi, but with simplifications for 64-bit integers.

Only minimal testing has been applied so far.
2000-07-15 13:26:50 +00:00
eeh 1b72cecb45 Block align pointer *AFTER* fixing up possible stack bias. 2000-07-08 16:02:15 +00:00
itohy af83a97717 Add special treatment of shmat(2).
On m68k ELF calling standard (__SVR4_ABI__), if a function
returns a pointer, the return value should go to a0 as well as d0.
2000-07-07 08:20:50 +00:00
kleink de9e80b40f Missed in previous: replace the previously used _brk label with an ordinary
local label; problem noticed by Matthias Drochner.
2000-07-04 07:37:33 +00:00
matt 7661e75ad4 Fix a major botch in 1.4 (which I did not do) which broke _brk and malloc. 2000-07-01 05:21:12 +00:00
matt c3530f0c12 Fix some bugs and clean up for ELF & a.out support 2000-06-30 23:46:36 +00:00
mrg 6b9ed41192 sync with libkern version; <vm/vm.h> -> <uvm/uvm_extern.h> 2000-06-29 06:30:02 +00:00
matt ae4364e1d3 Make these work with either a.out or ELF. 2000-06-28 19:20:16 +00:00
kleink b8a4d7adf9 Need an internal name for fork(). 2000-06-26 06:32:54 +00:00
kleink 2234f31b26 Add a _SYSCALL(entry,syscall) macro like the one found on other
architectures.
2000-06-26 06:31:37 +00:00
kleink 15bc7ed349 Thinko in previous: we do always use an internal name. 2000-06-26 06:25:36 +00:00
kleink 03f996bd0c Add internal names for brk() and sbrk(). 2000-06-23 15:40:36 +00:00
kleink 4d8e5be65e Delete the leftover _brk entry; as discussed with Ragge. 2000-06-23 07:18:09 +00:00
cgd db755e7c76 sweep of my licenses (userland files w/o only my copyright) for
consistency.  (no functional changes)
2000-06-14 17:24:02 +00:00
cgd d220ca5ba3 fix up NetBSD RCS Ids to match the standard, and the leading comment as
to match as well.  No functional changes.
2000-06-14 06:48:47 +00:00
msaitoh b2e2c7ec87 movstrSI*() for gcc -Os 2000-06-09 04:47:31 +00:00
tsubai bba37c9174 Add softfloat glue for sh3. 2000-06-06 17:28:37 +00:00
bjh21 4472dbe5e3 Initial commit of SoftFloat 2a import. This should provide a sensible
mostly-MI floating-point implementation for use by gcc -msoft-float.
It's currently only used by arm26, but should be usable by other ports
without too much hacking, assuming doubles and u_int64_ts are passed and
returned the same way, and FP formats are IEEEish.
2000-06-06 08:14:49 +00:00
castor 5510a708c4 Make __cerror be LEAF_NOPROFILE. I relies upon having v0 and v1 be unchanged
from the caller.   From Ethan Solomita <ethan@geocast.com>
2000-05-29 15:07:41 +00:00
bjh21 6c97e2bd78 Initial commit of arm26 port 2000-05-09 21:55:44 +00:00
erh b6ab3db38e Fix unaligned accesses more correctly. 2000-04-25 05:55:58 +00:00
erh 9396b0cf82 Fix unaligned accesses. 2000-04-25 05:54:33 +00:00
tsubai dc6a892a44 Add missing files. 2000-04-20 13:48:14 +00:00
mark a319e58c04 Fix alignment of __nanf and __infinity. Fixes PR9925. 2000-04-18 22:07:17 +00:00
mycroft fedba1d813 Clean up. 2000-04-03 04:20:44 +00:00
mycroft 72e604e414 Clean up.
* _REENTRANT is always defined.
* The vfork() stubs can use cerror.
2000-04-03 04:13:36 +00:00
mycroft 7f7027bb59 Repair syscall stubs that were not updated when the cerror interface was
modified.
2000-04-03 03:13:07 +00:00
msaitoh 9c587bcf2f fill delay slots (from Klaus Klein) 2000-03-27 16:27:16 +00:00
mycroft 78a4ddbd60 Do a little rearrangement here. No functional change, but it's a little
clearer what's going on.
The assembler still whines about the lack of `.cprestore' when profiling,
but I'm not going there right now.
2000-03-23 04:58:59 +00:00
soren 89c5a767f8 Fix doubled 'the's. 2000-03-13 22:55:05 +00:00
kleink e4d7c2e329 Add ISO C99 long long integer general utility interfaces; partially addresses
PR standards/9482.
2000-03-06 18:32:22 +00:00
shin e68fefb855 remove unused files (MIPS SOFTFLOAT). 2000-03-05 05:45:46 +00:00
shin ac9896415f remove MIPS SOFTFLOAT. 2000-03-05 05:41:03 +00:00
mycroft 19b51e87a9 Remove pointless #ifdef. 2000-02-25 17:40:30 +00:00
kleink 7b61131dba Missed in end -> _end cleanup. 2000-02-24 15:37:34 +00:00
kleink a379081935 For consistency with all other ports, clear errno in the prologue to the
syscall here as well - while the manual page advises applications to clear
errno themselves their actual behaviour may be questionable, especially in
light of the other ports' implementations.
2000-02-23 20:16:57 +00:00
mycroft 9ff0891c83 Fix bogons. 2000-02-22 03:28:04 +00:00
mycroft 5256a370bf Do the minimum work to make this compile with -Werror. 2000-02-22 03:14:20 +00:00
mycroft 32d50d3388 Do the minimum work to make this compile with -Werror. 2000-02-22 01:18:28 +00:00
mycroft d018facbbf A better fix for the stub-in-other-module problem:
Load the address of cerror through the GOT, so we can do a PIC_EPILOGUE and
leave the stack clean.
2000-02-19 21:04:58 +00:00
kleink b94df6841c (Re-)use the assembly version for labs() as well. 2000-02-06 13:14:51 +00:00
kleink b9d73b3129 Implement *__errno() redirection, with help from Matt Thomas. 2000-02-05 21:02:51 +00:00
kleink c54d3e28e2 Go via *__errno() here, too. 2000-02-05 19:53:54 +00:00
kleink c3ed25e892 Implement *__errno() indirection. 2000-02-05 19:20:53 +00:00
kleink fb2f23e243 Oops, need to save r2 and r3 as well. 2000-01-27 15:11:17 +00:00
kleink 9d7ea6523c Support *__errno() indirection. 2000-01-27 14:58:48 +00:00
kleink 1a3fa11c95 Support *__errno() indirection. 2000-01-24 21:57:39 +00:00
mycroft 5888ab27bd Make cerror() work correctly for stubs in other shlibs -- e.g. libposix. 2000-01-23 23:38:32 +00:00
mycroft c26054b799 Delint. 2000-01-22 22:40:58 +00:00
kleink 02867b49c9 Nuke the assembly version, which has been unused for > 2 years and is actually
identical to GCC's output from processing abs.c.
2000-01-20 18:28:33 +00:00
kleink 6910891781 Add NAN constant glue for sh3. 2000-01-17 16:27:53 +00:00
kleink 34c7685f30 Adjust for little endian environments (confirmed by msaitoh). 2000-01-17 16:21:36 +00:00
kleink 5d03e70658 (Re-)use the assembly version for labs(), too. 2000-01-16 00:32:32 +00:00
msaitoh df208e8ae8 sync with libkern 2000-01-14 22:55:46 +00:00
msaitoh 95d875fb90 libc for SH3.
TODO: fplib
2000-01-05 14:07:29 +00:00
eeh 0ba088f0a3 New bzero() using block store insns. 1999-12-30 15:31:39 +00:00
eeh d1b815fe32 Sample code to implement ffs() using the popc insn (if it's ever implemented). 1999-12-30 15:30:26 +00:00
shin 509e885e3b fix name space pollution by adding prefix '_mips_'.
closes PR 8770.
1999-12-26 00:22:31 +00:00
kleink 11e6c54cfc C99: Define a NAN macro in <math.h> which evaulates to a constant expression of
a single-precision quiet NaN; only to be defined on platforms that do support
this value.
1999-12-23 10:15:05 +00:00
matthias 87bb3a7b2b make this work again with -mrtd. 1999-11-16 18:16:53 +00:00
is eaf45b75c1 Fix spelling of contributors name 1999-10-27 09:10:27 +00:00
thorpej 3b435a7396 Add register prefixes. 1999-10-25 23:48:07 +00:00
itohy 1d0a433095 ELF PIC support. 1999-10-18 03:24:28 +00:00
itohy 29215efa45 ELF PIC support.
Small optimization.
1999-10-18 03:22:14 +00:00
shin 54de12eae6 remove extra lw (SOFTFLOAT) 1999-10-11 05:25:35 +00:00
shin f761ddb744 adjust #endif position (SOFTFLOAT) 1999-10-11 05:21:06 +00:00
takemura cdabc2eb91 Hpcmips needs completely FPU instruction free user land.
XXX, this modification is kinda ad-hoc.
1999-09-29 13:19:13 +00:00
kleink 30ae96c534 Oops, missed these in the mcount -> __mcount renaming. 1999-09-28 08:27:08 +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
mycroft 959acd6d47 Looks like I forgot to add this copy of isnan.c. 1999-09-17 21:32:53 +00:00
takemura 2f85eb6142 Import NetBSD/hpcmips source files from hpcmips repository.
file list:
        sys/arch/hpcmips/
        distrib/hpcmips/
        etc/etc.hpcmips/
        lib/libc/arch/mips/fplib/
        lib/libc/arch/mips/fplib/Makefile.inc
        lib/libc/arch/mips/fplib/environment.h
        lib/libc/arch/mips/fplib/fplib_glue.c
        lib/libc/arch/mips/fplib/fplib_libc.c
        lib/libc/arch/mips/fplib/hpcmips-gcc.h
        lib/libc/arch/mips/fplib/softfloat-macros.h
        lib/libc/arch/mips/fplib/softfloat-specialize.h
        lib/libc/arch/mips/fplib/softfloat.c
        lib/libc/arch/mips/fplib/softfloat.h
        lib/libc/arch/mips/gen/ieee.h
        lib/libc/arch/mips/gen/sf_fabs.c
        lib/libc/arch/mips/gen/sf_flt_rounds.c
        lib/libc/arch/mips/gen/sf_fpgetmask.c
        lib/libc/arch/mips/gen/sf_fpgetround.c
        lib/libc/arch/mips/gen/sf_fpgetsticky.c
        lib/libc/arch/mips/gen/sf_fpsetmask.c
        lib/libc/arch/mips/gen/sf_fpsetround.c
        lib/libc/arch/mips/gen/sf_fpsetsticky.c
        lib/libc/arch/mips/gen/sf_isinf.c
        lib/libc/arch/mips/gen/sf_ldexp.c
        lib/libc/arch/mips/gen/sf_modf.c
1999-09-16 12:13:17 +00:00
is bc086d24af In the division core: if the highest bit of the dividend is set,
we have to be careful when shifting the divisor. Test this.

This fixes PR 7760 by Richard Earnshaw.
1999-09-16 09:15:05 +00:00
drochner ec2a7d4249 SYS.h was nuked from libkern 1999-09-10 15:41:51 +00:00
chs f70d067294 use RODATA() instead of ENTRY() for __ffstab so that it works when profiling. 1999-09-06 19:00:24 +00:00
mycroft b3b07a4c6e Another microoptimization. Take advantage of the addition already having set
the flags for the <=0 comparison.
1999-08-30 18:28:24 +00:00
mycroft 0560606383 Reuse the trick of loading 0.0 (rather than 1.0) and then modifying the
exponent.  It's a bit faster on some machines.
1999-08-30 18:01:40 +00:00
mycroft 5579a03f91 Nuke unused variable. 1999-08-30 16:48:07 +00:00
augustss 75d2dfe657 Remove more unused mulexp variables. 1999-08-30 15:11:32 +00:00
augustss 6a4d7f0bc4 Make it compile again by removing an unused variable. 1999-08-30 12:14:09 +00:00
mycroft 9cba4741ee Use C versions of isinf() and isnan(). The assembler code is basically
identical, but was endian-dependent.
1999-08-29 23:01:40 +00:00
mycroft 6b221be206 ldexp(denormal, exp>1023) would generate the wrong result in all non-overflow
cases.  Totally rework this code to fix this bug *and* make it faster.
1999-08-29 22:50:25 +00:00
mycroft 5f34ffabca ldexp(denormal, exp>1023) would generate the wrong result in all non-overflow
cases.  Totally rework this code to fix this bug *and* make it faster.
1999-08-29 22:45:32 +00:00
mycroft c3140da584 Oops; committed wrong version here. 1999-08-29 19:42:54 +00:00
mycroft f784c98496 Reimplement the FSCALE version as C-with-assembler. (Make the compiler deal
with ABI crap.)
1999-08-29 19:41:53 +00:00
mycroft 0ae41d0984 Use the C version of ldexp(). The assembler version was broken in several
ways (ldexp(0.0, 5000) returned +Inf, didn't do normalization/denormalization,
etc.).
1999-08-29 19:08:44 +00:00
mycroft 02a48bde49 Don't ever return -0.0. 1999-08-29 19:04:02 +00:00
mycroft 0d708431b7 Minor style change. 1999-08-29 18:40:50 +00:00
mycroft ea4b733810 Trivial KNF. 1999-08-29 18:39:35 +00:00
mycroft 6850b97bb3 Sync with SPARC version. 1999-08-29 18:35:51 +00:00
mycroft ed01c49a3f Use the C version. The assembler version was just transliterated (and buggy)
anyway.
1999-08-29 18:32:36 +00:00
mycroft 099dd01a1d Make the C version of frexp() consitent across platforms, and handle the
Inf/NaN case.
1999-08-29 18:30:14 +00:00
mycroft 291053e1e2 Use ieee.h. 1999-08-29 18:23:26 +00:00
mycroft c8190acc41 Separate isnan() into a separate module, and make isinf()/isnan() use ieee.h. 1999-08-29 18:11:28 +00:00
mycroft 17030e8106 Separate isnan() into a separate module, and make isinf()/isnan() use ieee.h. 1999-08-29 18:08:27 +00:00
thorpej 30dca7f7db Add __msgctl13(), __semctl13(), and __shmctl13() (symbols are __RENAME()'d
in their respective header files).  Add PSEUDO stubs for the old versions
of these system calls.

Note that __semctl13() doesn't require the extra stub that the old
semctl()/__semctl() did, as the SUSv2 version takes variable arguments,
and thus does not require the extra indirection.
1999-08-25 05:09:27 +00:00
kleink 74511f97b1 Use _ALIGN_TEXT from <machine/asm.h>. 1999-08-23 08:45:09 +00:00
danw 687108b42f add the ieeefp functions 1999-07-07 01:55:07 +00:00
danw e8559a61eb mark an asm statement volatile so it doesn't get optimized out 1999-07-07 01:53:38 +00:00
pk 0ffda58ae9 A new implementation of _setjmp/_longjmp that uses the T_FLUSHWIN trap.
This means the stack frame and program counter can restored directly
from the jmp_buf, eliminating the need to backtrack through frames
which does not work in all cases.
1999-06-27 11:10:18 +00:00
tron d7678457d6 Fix definition of infinity. Patch supplied by Richard Earnshaw in
PR lib/7829.
1999-06-21 22:31:32 +00:00
matthias 71dd06e171 Go for correctness instead of speed as suggested by Ian Dall. This fixes
pr#port-pc532/7710.
1999-06-06 20:20:46 +00:00
matthias bb36354c10 Fix spurious page faults by double word aligning the source and not the
destination. Thank's to Ian Dall for this fix.
1999-06-06 19:49:11 +00:00
kleink 15fb0e4315 Shameless hack to reference end if using a.out and _end if using ELF. 1999-06-03 20:14:58 +00:00
kleink 5b4ea02521 _C_FUNC() -> _C_LABEL() 1999-05-06 14:01:20 +00:00
kleink c66e4d7122 * Prefix softfloat symbols which require external linkage with _arm32_ to
move them out of user namespace; declare those not requiring external linkage
static.
* In due course, disable those functions that require neither external nor
internal linkage.
Addresses PR port-arm32/7517.
1999-05-06 13:56:28 +00:00
tsubai cb9a32fdf9 * Add getcachelinesize() prototype.
* Make this compile with -D_STANDALONE.
1999-05-05 12:35:54 +00:00
kleink 5b2a4f0824 Call cerror through the PLT. 1999-05-02 23:19:49 +00:00
kleink 18d5ba6151 We can shave off a register-register move when using the SVR4 ABI: __errno()
will return its pointer result in a0.
1999-05-02 20:52:02 +00:00
kleink 4e0adc06d5 When using the SVR4 ABI, return pointer results in a0, too. 1999-05-02 20:34:04 +00:00
kleink 1bd013aa27 Oops, typo. 1999-05-02 20:18:17 +00:00
kleink d658cafb30 When using the SVR4 ABI, just return floating point values in fp0. 1999-05-02 20:17:20 +00:00
kleink bcd9993e4e When using the SVR4 ABI, return the pointer in a0, too. 1999-05-02 20:09:29 +00:00
ross c5a82dd848 * New MI man page for fp{set,get}{round,sticky,mask}(3).
* Implement fpgetsticky() for alpha.
* Direct fpsetsticky() and fp{get,set}mask() into alpha kernel via sysarch(2).
* Define new sysarch(2) stub for above and install and distribute sysarch.h
for alpha.  (The fpcr IS user mode r/w, but for reasons beyond the scope
of a commit message kernel calls are needed.) And much kernel Magick is
required before these do anything, but this way programs compiled under
1.4 will DTRT on future snapshots and releases.
1999-04-30 00:58:30 +00:00