Commit Graph

716 Commits

Author SHA1 Message Date
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