Commit Graph

13 Commits

Author SHA1 Message Date
Marcel Moolenaar
f0556e70bb Make profiling actually work. The gcc compiler emits a call to the
_mcount() stub when profiling is enabled. Emit this code sequence
for assembly routines as welli (MCOUNT definition in <machine/asm.h>.
We do not pass the GOT entry however as the 4th argument, because it's
not used. The _mcount() stub calls __mcount(), which does the actual
work. Define _MCOUNT_DECL to define __mcount. We do not have an
implementation of mcount(), so we define MCOUNT as empty, but have a
weak alias to _mcount() in _mcount.S.
Note that the _mcount() stub in the kernel is slightly different from
the stub in userland. This is because we do not have to worry about
nested routines in the kernel.
2004-08-25 07:42:34 +00:00
Doug Rabson
ccd13c49b5 Add support for TLS in statically linked programs. 2004-08-15 16:18:52 +00:00
David Schultz
479f8d2214 Make FLT_ROUNDS correctly reflect the dynamic rounding mode. 2004-07-19 08:17:25 +00:00
David Schultz
39bcea8689 Replace seven nominally MD implementations of frexp() that are broken
for subnormals with one implementation that works.
2004-07-18 21:23:39 +00:00
David Schultz
240dbabfa8 Implement the classification macros isfinite(), isinf(), isnan(), and
isnormal() the hard way, rather than relying on fpclassify().  This is
a lose in the sense that we need a total of 12 functions, but it is
necessary for binary compatibility because we have never bumped libm's
major version number.  In particular, isinf(), isnan(), and isnanf()
were BSD libc functions before they were C99 macros, so we can't
reimplement them in terms of fpclassify() without adding a dependency
on libc.so.5.  I have tried to arrange things so that programs that
could be compiled in FreeBSD 4.X will generate the same external
references when compiled in 5.X.  At the same time, the new macros
should remain C99-compliant.

The isinf() and isnan() functions remain in libc for historical
reasons; however, I have moved the functions that implement the macros
isfinite() and isnormal() to libm where they belong.  Moreover,
half a dozen MD versions of isinf() and isnan() have been replaced
with MI versions that work equally well.

Prodded by:	kris
2004-07-09 03:32:40 +00:00
Marcel Moolenaar
ec5f6d191d Implement signalcontext(). Needed by libpthread (aka libkse). 2003-06-24 05:06:42 +00:00
Marcel Moolenaar
fae3c3b7eb Rough implement of makecontext() needed to support libthr.
o  Up to 8 arguments are allowed. This is the number of arguments
   passed in registers. Subsequent registers are passed on the stack.
   Trying to deal with this is not easy in C and likely forces us to
   use assembly code. Let's avoid that for now. There's no indication
   that more than 8 arguments is a strong requirement (Linux also has
   an 8 argument limit).
o  We expect that the stack base is 16-byte aligned and the stack
   size is a multiple of 16-byte. We bomb out if this is not the case.
   We probably want to be less strict by enforcing it ourselves. For
   now it's better to not hide gross alignment bogons by silently
   correcting it.
2003-05-31 19:42:51 +00:00
Marcel Moolenaar
42cf585a69 Implement missing fpgetround() and fpsetround(). 2003-01-11 07:24:54 +00:00
Marcel Moolenaar
fef38f259f Sort SRCS. 2002-11-16 01:41:33 +00:00
Marcel Moolenaar
2d631dd6fa 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
Doug Rabson
9639b6892e Implement fpsetmask() and fpgetmask(). 2001-11-03 15:52:18 +00:00
Doug Rabson
9466885ca4 Add __divdf3(), __divsf3() and __infinity[].
Obtained from:	Intel (for the divide code)
2001-10-20 15:17:31 +00:00
Doug Rabson
94fb7ad620 Initial libc port for ia64. 2000-10-14 17:01:12 +00:00