Commit Graph

36 Commits

Author SHA1 Message Date
marcel
6909b46641 ia64 ABI breaker:
Don't force 16-byte alignment at run-time. Do it at compile-time.
This saves us the pointer fiddling by the setjmp functions and
reduces complexity. While here, increase the jmp_buf by 16 bytes
to an even 512 bytes. Coincidentally, due to the way alignment
was handled prior to this change, the jmp_buf has not changed in
size, but only in how the space is used. Prior to this change
the 16 bytes were reserved for enforcing alignment; now they are
reserved by us for future extensions.
Therefore, this ABI breaker is relatively save: the failure is
always an alignment trap.
2002-11-11 08:11:44 +00:00
archie
bdc5b263bf Re-apply the previously backed-out commit that fixes the problem where
HUGE_VAL is not properly aligned on some architectures. The previous
fix now works because the two versions of 'math.h' (include/math.h
and lib/msun/src/math.h) have since been merged into one.

PR:	bin/43544
2002-10-31 23:05:20 +00:00
archie
7dc4652022 Revert previous commit to unbreak world until we figure out the
right way to do it.
2002-09-20 15:43:26 +00:00
archie
0bd9b35ef7 Fix a problem with the definition of HUGE_VAL causing the gcc warning
"cast increases required alignment of target type" on some platforms.

Reviewed by:	bde
2002-09-19 19:47:27 +00:00
marcel
004dfe76c0 We cannot use an alloc with only inputs and/or locals. The kernel
assumes that the parameters are passed in output registers. Remove
the alloc entirely, but don't depend on the kernel not trashing
our registers.
2002-08-23 03:47:50 +00:00
jake
4d1b94f2e5 Generate the normal asm stubs for all sysv system calls. Use these instead
of C wrappers for the *sys indirect system calls.  The indirect system calls
are horribly broken on sparc64.

Submitted by:	tmm
2002-05-23 23:51:57 +00:00
obrien
b498f5d007 Our default syscall.S is identical to what was explicitly being done for
Alpha and IA-64.  So there is no need for special handling.
2002-05-15 21:17:59 +00:00
marcel
cdbf57d788 Implement _Unwind_FindTableEntry(). This function is part of GCC
for some configurations, but not for FreeBSD (yet?). Have one in
libc in the mean time.
2002-04-13 04:06:34 +00:00
obrien
3b58da09ea Fix the style of the SCM ID's.
I believe have made all of libc .h's as consistent as possible.
2002-03-22 23:42:05 +00:00
obrien
8bfc34249b Fix the style of the SCM ID's.
I believe have made all of libc .c's as consistent as possible.
2002-03-22 21:53:29 +00:00
obrien
e4063e15db Remove 'register' keyword. 2002-03-21 18:49:23 +00:00
mike
b2f3aa6012 o Move NTOHL() and associated macros into <sys/param.h>. These are
deprecated in favor of the POSIX-defined lowercase variants.
o Change all occurrences of NTOHL() and associated marcros in the
  source tree to use the lowercase function variants.
o Add missing license bits to sparc64's <machine/endian.h>.
  Approved by: jake
o Clean up <machine/endian.h> files.
o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>.
o Remove prototypes for non-existent bswapXX() functions.
o Include <machine/endian.h> in <arpa/inet.h> to define the
  POSIX-required ntohl() family of functions.
o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>,
  and <sys/param.h>.
o Prepend underscores to the ntohl() family to help deal with
  complexities associated with having MD (asm and inline) versions, and
  having to prevent exposure of these functions in other headers that
  happen to make use of endian-specific defines.
o Create weak aliases to the canonical function name to help deal with
  third-party software forgetting to include an appropriate header.
o Remove some now unneeded pollution from <sys/types.h>.
o Add missing <arpa/inet.h> includes in userland.

Tested on:	alpha, i386
Reviewed by:	bde, jake, tmm
2002-02-18 20:35:27 +00:00
dfr
2808db915d Implement fpsetmask() and fpgetmask(). 2001-11-03 15:52:18 +00:00
dfr
5d8c745d81 Compensate for the way that _setjmp aligns the start of jmp_buf. 2001-10-26 08:26:45 +00:00
peter
f765de5a8e Fix WAW dependency. p6 is written in the syscall epilogue. 2001-10-22 09:17:14 +00:00
dfr
5c371836c3 Fix a few more dependancy violations. 2001-10-22 08:48:11 +00:00
dfr
f87cf4b8a5 Implement setjmp, longjmp, sigsetjmp and siglongjmp. 2001-10-20 15:19:08 +00:00
dfr
a1b35749c4 Add __divdf3(), __divsf3() and __infinity[].
Obtained from:	Intel (for the divide code)
2001-10-20 15:17:31 +00:00
dfr
d6e961ff95 Adjust so that we don't use relocations which can't exist in a shared
library.
2001-10-10 10:35:01 +00:00
dfr
05752fa7a3 Shorter versions of the byte swapping code. 2001-10-10 10:34:08 +00:00
dfr
dcbef22cf8 Fix a load of dependancy violations. 2001-10-05 18:52:42 +00:00
dfr
b069d672e1 Fix a whole bunch of dependancy bugs and make it actually work when the
size is not a multiple of eight.
2001-09-22 18:27:01 +00:00
dfr
18649df8d0 Fix byte swapping - it was totally broken. 2001-09-22 18:22:53 +00:00
dfr
60b84b2ad7 Implement _setjmp()/_longjmp().
Obtained from: Intel's EFI toolkit
2001-09-04 08:27:39 +00:00
ru
325db7b385 Removed duplicate VCS ID tags, as per style(9). 2001-08-13 14:06:34 +00:00
dfr
0e04b31ae2 Use relative paths to find byte_swap_*.S to make it easier to use these
from libstand.
2001-03-06 16:08:19 +00:00
dfr
e8dc841519 Make this compile. Still need to write/borrow a working setjmp. 2001-03-06 16:07:41 +00:00
obrien
e5aa652797 Correct a comment. 2001-03-05 10:00:57 +00:00
deischen
d19e06365b Clean up syscall generation in libc by removing HIDDEN_SYSCALLS
and treating (almost) all system calls the same way:

	__sys_foo - actual syscall
	foo, _foo - weak definitions to __sys_foo

Change PSEUDO syscalls (currently only _exit and _getlogin) to
be __sys_foo (T) and _foo (W).

Add $FreeBSD$ to a few files to satisfy commitprep.

Suggested by:	bde
2001-01-29 03:23:46 +00:00
deischen
c8399e648f Comment only change; s/_thread_sys_/__sys_/ 2001-01-26 02:41:07 +00:00
deischen
dd8c04d769 Remove _THREAD_SAFE and make libc thread-safe by default by
adding (weak definitions to) stubs for some of the pthread
functions.  If the threads library is linked in, the real
pthread functions will pulled in.

Use the following convention for system calls wrapped by the
threads library:
	__sys_foo - actual system call
	_foo - weak definition to __sys_foo
	foo - weak definition to __sys_foo

Change all libc uses of system calls wrapped by the threads
library from foo to _foo.  In order to define the prototypes
for _foo(), we introduce namespace.h and un-namespace.h
(suggested by bde).  All files that need to reference these
system calls, should include namespace.h before any standard
includes, then include un-namespace.h after the standard
includes and before any local includes.  <db.h> is an exception
and shouldn't be included in between namespace.h and
un-namespace.h  namespace.h will define foo to _foo, and
un-namespace.h will undefine foo.

Try to eliminate some of the recursive calls to MT-safe
functions in libc/stdio in preparation for adding a mutex
to FILE.  We have recursive mutexes, but would like to avoid
using them if possible.

Remove uneeded includes of <errno.h> from a few files.

Add $FreeBSD$ to a few files in order to pass commitprep.

Approved by:	-arch
2001-01-24 13:01:12 +00:00
jake
93aa222459 Remove last vestiges of thr_sleep and thr_wakeup from libc. 2000-12-02 05:58:03 +00:00
dfr
3ce4aa655c Return zero from setjmp() and _setjmp() for now. 2000-10-16 16:51:50 +00:00
dfr
010f39c0b6 Fix a couple of dumb mistakes. 2000-10-16 16:48:48 +00:00
marcel
80dc7c7e97 Fix RAW dependency violation on p6 between cmp and mov. 2000-10-15 20:33:41 +00:00
dfr
110bc45569 Initial libc port for ia64. 2000-10-14 17:01:12 +00:00