Commit Graph

141 Commits

Author SHA1 Message Date
joerg cee5599b68 Add logbl(3). 2011-08-03 14:13:07 +00:00
joerg 5ccaf4b804 Add ilogbl(3). 2011-07-28 22:32:28 +00:00
matt ad1826f0ba Add scalbn{,f,l} for VAX. 2011-07-28 20:53:20 +00:00
joerg 37ef12d394 Add optimised version of scalbnl for x86. 2011-07-26 17:03:23 +00:00
joerg e060a1ff71 Actually used SSE branch. Noticed by enami@ 2011-06-21 21:52:49 +00:00
joerg 17f4d79daf Use correct stack register as noticed by christos 2011-06-18 22:19:52 +00:00
joerg 7d48645456 Kill redundant ; 2011-06-18 21:24:51 +00:00
joerg 658a2a5f07 Switch to SSE code, since our gas supports it now. 2011-06-18 20:49:26 +00:00
joerg 47980a5652 SSE2 registers are only used for float and double arguments, so update
comment to reflect reality. Add some accessor macros for long double
arguments for i386 and x86_64.
2011-06-18 18:16:40 +00:00
nakayama 88e42b609b Add fenv support for sparc. Mostly copied from sparc64 and share with it. 2011-05-20 21:42:48 +00:00
christos 17b8402a39 fenv support for sparc64 from Stathis Kamperis 2011-01-31 00:19:33 +00:00
taca 5dad8344cc Fix compile error. 2010-08-01 06:34:38 +00:00
joerg c271d4f25f Fix merge error: drop machine from an older workaround for machine.sse
under compat32, drop the assertion, initialize oldlen.
2010-07-31 22:14:18 +00:00
joerg 7f1183f226 Add support for fenv.h interface for i386 and amd64.
Submitted by Stathis Kamperis as part of GSoC 2010 and ported from
FreeBSD.
2010-07-31 21:47:52 +00:00
drochner d4def06880 -build ldexp/frexp/modf locally again rather than relying on libc
reaching over, to get things into a sane state,
-do the usual namespace protection game with scalbn(f) because it
 is used internally
(more symbol renamings are necessary)

The weak_alias change for mc68881 is untested.
2010-04-23 19:17:07 +00:00
phx 7377320537 Jump through the PLT in PIC mode to fix the DT_TEXTREL warning on creating
the shared object.
2010-01-06 14:10:57 +00:00
is c4a186ea1c Move to two-clause license. 2009-11-09 15:35:27 +00:00
drochner 39ba286079 as in exp(), treat +/-Inf and NaN arguments specially, should fix
eg expf(-Inf) which was Nan previously
(We could avoid touching the i387 on amd64 in these cases, but we'd
need to bypass the ABI abstraction macros, so leave it the old way
for now.)
2008-06-24 17:27:56 +00:00
drochner bc43bac5ca -fix an obvious mistake in fpcw check
-replace ARG_DOUBLE_ONE_HALF by _MSW/_LSW because this reflects the
 intention and also matches the terms used in C code,
 also make the code where the fpcw overwrites the argument a bit
 self-documenting
 (this abstraction sucks because it forces to write inefficient code)
2008-06-23 10:24:13 +00:00
christos 1d1021c331 add macros for the upper half of the double arguments. 2008-06-23 00:14:46 +00:00
christos 8a9e7b0124 Share the amd64 and i386 exp versions. Fixes a problem with exp(-Inf) != 0. 2008-06-23 00:12:04 +00:00
ad 6e5329fd40 Use a dummy assembly file so we won't try produce lint stuff. 2008-06-06 13:35:06 +00:00
ad 61464a76be Forgot to add this yesterday. 2008-06-04 14:59:39 +00:00
ad 1b74c9b77c - Fold libm387 into libm.
- Leave libm387 as an empty shell.
2008-06-03 18:47:28 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
christos 98e7e8e9f7 avoid shadow variables, and enable lint. 2008-04-25 22:21:53 +00:00
mhitch f8f1643217 Fix weak alias. 2008-03-20 18:49:39 +00:00
mhitch 83e4fa69d9 Add wrappers for missing coshf(), expf(), logf(), sinhf(), atan2f(), and
hypotf() functions for vax.  Play the namespace and weak alias game for
functions used internally by the complex functions.  Should fix the vax
build of libm.
2008-03-20 16:41:26 +00:00
matt ec31ca5aa4 Mark some internal libm symbols as hidden 2007-04-19 00:37:20 +00:00
matt ae3ada32fe Make the internal __libm_dsqrt_r6 have a fake entry mask of 0 to make
ld.elf_so.
2007-04-18 04:46:13 +00:00
drochner b0f21ee1ea merge libc/arch/{i386,x86_64}/gen/modf.S into one
(not quite a merge actually, just an #ifdef for now)
and build it in the i386 case (amd64 should work, just needs to be tested)
That way, a program linking against libm should get the optimized
version as expected.
2006-03-22 20:45:58 +00:00
drochner 0e514dc492 The second argument is not a float, so the "abi.h" abstraction
doesn't work.
Open-code the argument handling instead.
Should fix the ldexp() bug reported by Brendon Costa in port-amd64.
2006-03-21 11:35:21 +00:00
is 42796049d0 C versions of non-IEEE round() / roundf(). Alas, using the VAX
cvtrdl; cvtld doesn't work for big numbers.
2006-01-17 13:16:08 +00:00
is e08ae477d9 Oops - round() is supposed to return double, not integer. 2006-01-17 10:39:23 +00:00
is 5703e44cdb Implement round(3), so that jot(1) can link again. 2006-01-15 12:39:44 +00:00
drochner 7ad8526195 activate e_atan2f.S which was there forever but not built, noticed
by Joerg Sonnenberger
2005-07-28 17:55:19 +00:00
rpaulo fcfde3ffb8 Bump minor version for log2{,f}. 2005-07-21 22:49:16 +00:00
rpaulo 1185f13617 Add i387 FPU routines for log2(3) and log2f(3).
ok christos@
2005-07-21 20:58:21 +00:00
drochner b774d2ae7d add licenses 2004-10-13 15:18:31 +00:00
drochner c351eda960 amd64: stack sanity, leave the return PC alone 2004-07-16 18:40:24 +00:00
drochner 3e7f9e1481 allocate stack space for temporary storage 2004-07-02 10:17:23 +00:00
drochner 07be12b505 also provide an alpha assembler implemtation of lrint() 2004-07-01 19:08:21 +00:00
drochner af7cf00a5a provide an assembler implementation of lrint() for i386 and amd64 2004-07-01 17:30:48 +00:00
mhitch a6d522d13c Add ceilf(), floorf(), and sqrtf() (as wrappers using ceil(), floor(), and
sqrt() repectively).  The fixes PR#22796.
2004-05-13 20:35:40 +00:00
wiz 848e689872 Typo fix, from skrueger at europe com. 2004-03-22 13:41:09 +00:00
lukem f85d2d1c14 Use ${HOST_SH} instead of `sh'.
If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.
2003-10-26 07:25:33 +00:00
wennmach be03f9bd59 Avoid the PIC dance. 2003-09-16 18:17:11 +00:00
fvdl 8eb02ce5c0 Make log1p and log1pf work in shared libraries again. 2003-09-14 21:26:14 +00:00
wennmach cf92bf760d Reimplement s_log1p.S and s_log1pf.S to use the fyl2xp1 instruction
where necessary.

The log1p() function is provided to compute an accurate value of
log(1 + x), even for tiny values of x. The i387 FPU provides the
fyl2xp1 instruction for this purpose.

However, since the range of the fyl2xp1 function is limited to
-(1 - (sqrt(2) / 2)) <= x <= sqrt(2) - 1
          (-0.292893 <= x <= 0.414214)
we need to check if the argument is in the valid range.

In order to reduce the cost for testing the range, we only use
fyl2xp1 if the argument is in the range
               -0.25 <= x <= 0.25
which can be checked with just one conditional branch.

Fixes PR lib/22599 by Ray Brownrigg.
2003-09-10 16:45:43 +00:00
agc eb7c1594f1 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22280, verified by myself.
2003-08-07 16:42:00 +00:00