summaryrefslogtreecommitdiffstats
path: root/lib/libm/arch/amd64 (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix ilogb(3) implementation. The results have to match FP_ILOGB0 andkettenis2020-11-072-40/+0
| | | | | | | | | | FP_ILOGBNAN which isn't the case for the amd64 and i386 assembly versions. Drop these in favour of C implementations. Als reimplement ilogbl(3) by providing separate ld80 and ld128 implementations that replace the existing implementation which may hit an infinite loop when built for quad-precision long double. ok patrick@, gkoehler@
* Add missing retguard checkmortimer2018-07-081-1/+2
| | | | ok deraadt
* Add retguard macros to libm assembly.mortimer2018-07-0343-43/+135
| | | | ok deraadt
* Make the binding of rintl, significand, and significandf consistentlyguenther2018-03-122-2/+4
| | | | | | 'weak' in the static libm.a ok deraadt@
* Constants which can go into .rodataderaadt2018-02-052-2/+4
|
* Use 0xcc trapsleds instead of default/nop/0xcc in BTC alignmentsderaadt2017-08-192-10/+6
| | | | don't bother with .text before ENTRY()
* copysign and copysignf are used within libm, so declare them accordingly.naddy2016-12-222-4/+8
| | | | | | | Required if the compiler doesn't replace them with builtins (e.g. clang on amd64). ok kettenis@ guenther@ i386 sync requested by guenther@
* Reduce libm's exports and make internal calls go direct.guenther2016-09-1245-50/+128
| | | | | | All dependencies on libc are now via reserved/standardized names. ok kettenis@ millert@ deraadt@
* It's been a quarter century: we can assume volatile is present with that name.guenther2014-04-181-39/+39
|
* Get rid of the very ugly lint workarounds: LINTLIBRARY, PROTOLIB,martynas2013-01-131-5/+1
| | | | and a few empty files for lint to chew on.
* Remove excessive sys/cdefs.h inclusionderaadt2012-12-051-4/+2
| | | | ok guenther millert kettenis
* Switch to the SSE code. OK mikeb@.martynas2011-07-092-44/+5
|
* Don't reimplement the same thing twice. OK matthew@.martynas2011-07-091-21/+0
|
* Revert (leaving the complex math part alone). Some stuff is dependingmartynas2011-07-082-108/+0
| | | | | on this historical behavior; so we're stuck in this stupid situation. No cookie for me.
* Move fabs(3), frexp(3), and modf(3) to libm--nothing has been usingmartynas2011-07-082-0/+108
| | | | them in libc for a very long time. OK guenther@.
* Make lint play nicer in pass 2 of libm on amd64 and i386. Themartynas2011-05-311-1/+5
| | | | | | internal _ItL_* extended-precision constants are of course going to be declared inconsistently since we define them based on structures; however prototype as long doubles.
* fenv improvements and cleanupsmartynas2011-04-281-42/+29
|
* fenv for amd64; from matthew@martynas2011-04-211-0/+423
| | | | feedback & ok guenther@, matthew@
* typo in a commentderaadt2010-06-031-2/+2
|
* Provide assembly version of sqrtl(3).kettenis2009-11-061-0/+12
| | | | ok pirofti@
* fix scalbn, scalbnf, frexpf on amd64. don't use double argmartynas2009-04-252-10/+16
| | | | | | | | | | float/double prologue/epilogue, since the second argument is not float/double. were never working properly (always returned inf). actually, should help other math funcs (like pow) too, since they use it internally tested by kurt@; devel/boost fp regresses are working better now. ok kurt@
* alias and give frexpf symbol external linkage to scalbnf; this wasmartynas2009-04-211-1/+4
| | | | | | | | overriden by md source. spotted by kurt@ actually; on amd64 scalbnf, scalbn (and therefore now frexpf) have always been broken since second argument is not float. fix is under reviewal / will be committed separately ok kurt@, kettenis@, millert@. tested by kurt@
* lrint, llrint, lrintf, llrintf for amd64. ok kettenis@, oga@martynas2009-04-104-0/+48
|
* missing rcs ids; spacingmartynas2009-04-083-12/+13
|
* remove i386/x86_64 ifdefs. i386 lives @ i387. miod@ agreesmartynas2009-04-0811-183/+10
| | | | object code matches so this got to be oki
* - 80-bit and quad precision trigonometric and other mostmartynas2008-12-093-49/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | important functions: acosl, asinl, atanl, atan2l, cosl, sinl, tanl, exp2l, frexpl, ilogbl, ldexpl, logbl, scalbnl, fabsl, hypotl, powl, sqrtl, rintl, copysignl, nanl, fdiml, fmaxl, fminl. mostly taken from freebsd, needed alot of changes to adapt. note, these are all c versions; and are quite slow when architectures have, e.g. sqrt. assembly versions will be added afterwards - make them .weak/__weak_alias to the double precision versions on other archs - no need to have two finites. finite() and finitef() are non-standard 3BSD obsolete versions of isfinite. remove from libm. make them weak_alias in libc to __isfinite and __isfinitef instead. similarly make 3BSD obsolete versions of isinf, isinff, isnan, isnanf weak_aliases to C99's __isinf, __isinff, __isnan, __isnanf - remove unused infinity.c. the c library has infinities for each supported platform - use STRICT_ASSIGN cast hack for _kernel_rem_pio2, so that the double version has a chance of working on i386 with extra precision - avoid storing multiple copies of the pi/2 array, since it won't vary - bump major due to removed finite/finitef. although they will be in libc, which anything is linked to, minor bump might be enough ok millert@. tested by sthen@, jsg@, ajacoutot@, kili@, naddy@
* - replace dtoa w/ David's gdtoa, version 2008-03-15martynas2008-09-0713-26/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - provide proper dtoa locks - use the real strtof implementation - add strtold, __hdtoa, __hldtoa - add %a/%A support - don't lose precision in printf, don't round to double anymore - implement extended-precision versions of libc functions: fpclassify, isnan, isinf, signbit, isnormal, isfinite, now that the ieee.h is fixed - separate vax versions of strtof, and __hdtoa - add complex math support. added functions: cacos, casin, catan, ccos, csin, ctan, cacosh, casinh, catanh, ccosh, csinh, ctanh, cexp, clog, cabs, cpow, csqrt, carg, cimag, conj, cproj, creal, cacosf, casinf, catanf, ccosf, csinf, ctanf, cacoshf, casinhf, catanhf, ccoshf, csinhf, ctanhf, cexpf, clogf, cabsf, cpowf, csqrtf, cargf, cimagf, conjf, cprojf, crealf - add fdim, fmax, fmin - add log2. (adapted implementation e_log.c. could be more acruate & faster, but it's good enough for now) - remove wrappers & cruft in libm, supposed to work-around mistakes in SVID, etc.; use ieee versions. fixes issues in python 2.6 for djm@ - make _digittoint static - proper definitions for i386, and amd64 in ieee.h - sh, powerpc don't really have extended-precision - add missing definitions for mips64 (quad), m{6,8}k (96-bit) float.h for LDBL_* - merge lead to frac for m{6,8}k, for gdtoa to work properly - add FRAC*BITS & EXT_TO_ARRAY32 definitions in ieee.h, for hdtoa&ldtoa to use - add EXT_IMPLICIT_NBIT definition, which indicates implicit normalization bit - add regression tests for libc: fpclassify and printf - arith.h & gd_qnan.h definitions - update ieee.h: hppa doesn't have quad-precision, hppa64 does - add missing prototypes to gdtoaimp - on 64-bit platforms make sure gdtoa doesn't use a long when it really wants an int - etc., what i may have forgotten... - bump libm major, due to removed&changed symbols - no libc bump, since this is riding on djm's libc major crank from a day ago discussed with / requested by / testing theo, sthen@, djm@, jsg@, merdely@, jsing@, tedu@, brad@, jakemsr@, and others. looks good to millert@ parts of the diff ok kettenis@ this commit does not include: - man page changes
* - remove isinff, isnanf. this has been moved to libcmartynas2008-07-241-19/+0
| | | | | | | | | | | - remove never-enabled signbit. libc has is now - add C99 implementations, from freebsd, for nan(), nanf() (needed to write _digittoint for it), exp2(), exp2f(), remquo(), remquof(), needed STRICT_ASSIGN macro for math_private.h - bump major man pages will follow exp2{,f} has been requested by chl@ ok millert@
* amd64 version of __signbit() (pedro sized quad floats... really just IEEEjason2007-06-011-0/+19
| | | | extended padded to 16 bytes)
* netbsd: stack sanity, leave the return PC alonemartynas2007-04-201-3/+3
| | | | ok kettenis@
* New amd64 exp(3).kettenis2006-03-191-0/+101
| | | | tested by steven@, ok otto@
* amd64 asm code is not correct for exp(+/-Inf), so until somebodyotto2006-03-141-129/+0
| | | | | comes up with a correct asm version, use the C version of exp(3). ok steven@ kettenis@
* Add missing $OpenBSD$ tags.espie2005-08-0241-85/+41
| | | | | | Zap wasteful RCSID("$NetBSD$") okay deraadt@
* pull in r1.8 from NetBSD, drochner: "amd64: stack sanity, leave thedhartmei2005-03-011-2/+2
| | | | return PC alone", via hugh@
* Fix a typo and get good results in the process, fixes PR 3830 and passesmiod2004-07-221-1/+1
| | | | Perl's regression test; ok art@
* add libm parts for amd64; much from netbsd, integration by mickey.deraadt2004-02-0842-0/+1322
Instead of mixing the i387 & xmm register components, we decide to explicitly seperate them. libm is already confusing enough as it is, thank you very much