Commit Graph

195 Commits

Author SHA1 Message Date
kleink 3b364b9b85 Make sure we reference getcontext() by its internal name. 2003-04-07 21:04:20 +00:00
nathanw 4fb740b8de Implement pthread_atfork() (in libc, because the required threadlib
stub behavior is exactly the same as the usual behavior).
2003-02-13 02:50:48 +00:00
kleink 9b24979426 Fix comment typo, and convert to C-style comments. 2003-01-26 17:58:55 +00:00
thorpej 3fdac2b8c5 Merge the nathanw_sa branch. 2003-01-18 10:52:16 +00:00
thorpej c061e6bf8b Enable the libc-provided signal trampoline. The old __sigaction14
entry point has been replaced by the new __sigaction14() which is a
wrapper around the __sigaction_sigtramp system call (which is itself
not directly exposed outside of libc).

No shared library version change is necessary; no new symbols
are exposed outside of libc.
2002-07-10 04:29:05 +00:00
thorpej 8aa4d3caec New __sigaction14() system call stub which registers the signal
trampoline, and the signal trampolines themselves.

NOTE: These are not yet enabled; they will be enabled after further
testing on more architectures.
2002-07-09 23:32:35 +00:00
thorpej d9f211b107 Make this work with an ISO C preprocessor. 2002-05-30 05:08:51 +00:00
wiz 92d8b1e9fa Revert previous: .S files are currently compiled with -traditional-cpp,
so __STDC__ is _not_ always defined.
2002-05-26 12:24:55 +00:00
wiz d56bb7c2ec __STDC__ is always defined on NetBSD. 2002-05-26 11:48:00 +00:00
simonb 2d8577fb83 Clean up some rampant code duplication wrt ieee number handling:
- Add alignment-safe double and float unions.
 - Use the above for the __infinity and __nan constants on all
   architectures that use the standard ieee754 representation of
   those constants.
 - Add a single copy of various ieee754 math functions (frexp, isinf,
   isnan, ldexp and modf) that had numerous duplicates among the
   arch-specific directories.
 - Use the above functions on all architectures where the generic C
   versions where used.  Architectures that had local assembly
   routines are untouched (for those functions only).
2002-02-19 13:08:12 +00:00
aymeric 5927ef00d8 Redefine ENTRY properly for both ELF and a.out
Now we can compile profiled m68k programs that use libc.
2002-01-22 22:44:43 +00:00
thorpej ac8c1c29e9 * Add WSYSCALL() to SYS.h, which creates a system call with an
internal name and a weak alias for the name.
* Add a WEAKASM syscall list, and process it.
* Make sysarch() have an internal name (_sysarch()).
2002-01-14 00:55:55 +00:00
thorpej 5d3e829423 Add internal names for fp{get,set}{mask,round,sticky}(), and
externally-visible weak aliases for the internal names.
2002-01-13 21:45:39 +00:00
drochner f0f40184c9 -Wshadow fix 2001-11-07 17:56:32 +00:00
drochner dacd4ae4c5 cpoy from the 040 version: -Wshadow warning fix 2001-11-07 17:55:42 +00:00
drochner f3b5b119ec fix -Wshadow warnings 2001-11-07 13:44:58 +00:00
fredette 129f58b424 On the 68010, don't bother with the by-8-longwords loop, instead
only 16-bit align the region and use loop mode with longwords
to do the bulk of the work.

On the 68020+, fixed an optimization bug where all regions that start
on odd addresses would not be properly longword aligned.
2001-09-07 12:50:01 +00:00
scw b722bfb186 Compensate for the syscall args stack cleanup in the clone.
(Pointed out by Matthias Pfaller)
2001-07-20 17:08:18 +00:00
scw c45a0d8765 clone(2) syscall frontend for m68k. 2001-07-19 21:50:46 +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 3529d6d10f Add missing internal names and weak aliases to assembly versions. 2001-05-29 13:03:01 +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 f56935aca7 Shameless hack to reference end when using a.out and _end when using ELF. 2001-05-05 17:46:37 +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
scw e86cd7609a The bare minimum to get m68k libc working again... 2000-12-13 21:46:23 +00:00
is aaed06d422 Identical on m68k. 2000-12-11 16:17:18 +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
kleink a253819635 Whitespace botch in previous, noticed by Leo Weppelman and Thorsten Frueauf. 2000-10-02 14:52:39 +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
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 b8a4d7adf9 Need an internal name for fork(). 2000-06-26 06:32:54 +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 e4d7c2e329 Add ISO C99 long long integer general utility interfaces; partially addresses
PR standards/9482.
2000-03-06 18:32:22 +00:00
mycroft c26054b799 Delint. 2000-01-22 22:40:58 +00:00
kleink 5d03e70658 (Re-)use the assembly version for labs(), too. 2000-01-16 00:32:32 +00:00