summaryrefslogtreecommitdiffstats
path: root/lib/libm/arch
AgeCommit message (Collapse)AuthorFilesLines
2020-11-07Fix ilogb(3) implementation. The results have to match FP_ILOGB0 andkettenis4-86/+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@
2020-07-09The fegetexceptflag() function should not have a DEF_STD.kettenis1-2/+1
Brings arm64 in line with all the other architectures. ok millert@
2020-06-28Add powerpc64 fenv bits; copied from powerpc. From drahn@kettenis1-0/+339
2019-03-12Setting and getting the rounding mode on our arm64 FPU has not workedpatrick1-9/+14
in libm since the rounding mode is in fpcr, not fpsr. Since both FPU registers are 32-bit we can store them in the 64-bit fenv_t to make handling the bits easier. While there add FE_DENORMAL, which also exists on x86. Also make sure that whenever we are being passed an exception mask, we only allow the bits that are supported by hardware. Found by regression tests Debugged with Moritz Buhl ok kettenis@
2018-07-08Add missing retguard checkmortimer1-1/+2
ok deraadt
2018-07-03Add retguard macros to libm assembly.mortimer43-43/+135
ok deraadt
2018-03-16Since most (if not all) ARMv8 hardware doesn't actually support trapping ofkettenis1-20/+4
floating-point exceptions, simplify the functions that control the exception masks just like we did on armv7. ok tom@
2018-03-12Make the binding of rintl, significand, and significandf consistentlyguenther4-4/+8
'weak' in the static libm.a ok deraadt@
2018-02-28Change floating-point mode/environment control functions to operate onkettenis1-39/+79
both the hardfloat (FPU registers) and softfloat (software) state. This makes these functions work correctly when mixing hardfloat and softfloat code. Disable trapping for softfloat since most (if not all) ARMv7 and ARMv8 hardware that is on the market doesn't support trapping of floating-point exceptions. ok patrick@
2018-02-05Constants which can go into .rodataderaadt2-2/+4
2017-08-19Use 0xcc trapsleds instead of default/nop/0xcc in BTC alignmentsderaadt3-13/+9
don't bother with .text before ENTRY()
2017-01-11Add support for AArch64. Based on FreeBSD's msun header, modifiedpatrick1-0/+284
to look and feel like our code.
2016-12-22copysign and copysignf are used within libm, so declare them accordingly.naddy4-10/+14
Required if the compiler doesn't replace them with builtins (e.g. clang on amd64). ok kettenis@ guenther@ i386 sync requested by guenther@
2016-09-12Reduce libm's exports and make internal calls go direct.guenther113-157/+410
All dependencies on libc are now via reserved/standardized names. ok kettenis@ millert@ deraadt@
2016-09-01retire the sparc library codetedu1-336/+0
2016-05-12more hppa64 cleaningderaadt1-370/+0
2016-03-10more pieces of vaxderaadt9-1846/+0
2015-01-20Missing $OpenBSD$'s.krw12-0/+12
ok deraadt@
2014-09-12Provide a sparc64 version of sqrtl(3) that simply calls _Qp_sqrt.kettenis1-0/+29
The generic sqrtl(3) is not nearly accurate enough for quad-precision floating point.
2014-04-18It's been a quarter century: we can assume volatile is present with that name.guenther28-322/+322
2014-03-18Retire hp300, mvme68k and mvme88k ports. These ports have no users, keepingmiod59-2687/+0
this hardware alive is becoming increasingly difficult, and I should heed the message sent by the three disks which have died on me over the last few days. Noone sane will mourn these ports anyway. So long, and thanks for the fish.
2013-08-06scalbnf on vax, okay miod@espie1-1/+8
2013-07-15Fix atan2f() and hypotf() by actually converting both their arguments to themiod2-4/+6
larger type and passing them both the the double routine.
2013-07-15add some missing asm functions to vax: long double as aliases to double,espie6-10/+51
and float functions by cvtfd/cvtdf (like in netbsd) scalbnf will have to wait, as it's more complicated... brings vax in line with the rest. okay miod@/martynas@
2013-07-05VAX ELF userland bits. Consists mostly of register prefix additions.miod9-490/+490
2013-03-28Switch libc and libm to use strong aliases rather than weak aliasesmartynas14-24/+24
where appropriate. Among other things makes the symbols consistent across all architectures (notably where ldbl mantissa is 53 bits). While at it, kill unused LINTLIBRARY/PROTOLIB1 cruft which was there to trick lint into recording the right prototypes for aliased functions. Most of the work done at the awesome n2k13 hackathon. Agreed by kettenis@, guenther@, matthew@.
2013-02-02Userland bits for m68k/ELF. Mostly addition of register prefixes to themiod59-349/+206
assembler instructions, and cope with the few changes in return values location.
2013-01-13Get rid of the very ugly lint workarounds: LINTLIBRARY, PROTOLIB,martynas5-33/+3
and a few empty files for lint to chew on.
2013-01-05Switch m88k ports to ELF.miod1-26/+26
2012-12-30Provide proper ldexp{f,l} aliases to scalbn{f,l} to match the MI (ld80) code.miod2-2/+4
2012-12-05Remove excessive sys/cdefs.h inclusionderaadt16-42/+17
ok guenther millert kettenis
2012-08-23Aliases for extended precision were missed on a few functions on hppa.martynas5-1/+12
Reported by Brad, thanks!
2011-07-09Switch to the SSE code. OK mikeb@.martynas2-44/+5
2011-07-09Don't reimplement the same thing twice. OK matthew@.martynas3-82/+0
2011-07-08Revert (leaving the complex math part alone). Some stuff is dependingmartynas20-1168/+0
on this historical behavior; so we're stuck in this stupid situation. No cookie for me.
2011-07-08Move fabs(3), frexp(3), and modf(3) to libm--nothing has been usingmartynas20-0/+1168
them in libc for a very long time. OK guenther@.
2011-05-31Make lint play nicer in pass 2 of libm on amd64 and i386. Themartynas2-2/+10
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.
2011-05-30Trick lint into recording the right prototypes in the llib-lm.lnmartynas3-10/+22
database on platforms without extended-precision floating-point support. Seems like a reasonable approach to millert@.
2011-05-28Adapt m68k MD functions to extended-precision.martynas11-0/+502
Go for it miod@.
2011-05-28Adapt m68k MD functions to single-precision.martynas24-0/+996
Looked over by miod@.
2011-04-29Trick GCC (-O2) into actually raising the underflow exception on m88k.martynas1-3/+3
Since the second division operand is a power of two, non-zero, non-nan, this got optimized (-O2) into multiplication. As a result the underflow exception wasn't being raised properly. Make the second operand a volatile to prevent incorrect optimizations. OK miod@.
2011-04-28ixnay on the nopfaymiod1-3/+1
2011-04-28fenv improvements and cleanupsmartynas13-734/+1366
2011-04-26fenv for mips64martynas1-0/+316
2011-04-25fenv for sparc; mostly cloned from sparc64martynas2-1/+354
2011-04-25fenv for powerpcmartynas1-0/+354
2011-04-24fenv for shmartynas1-0/+381
2011-04-24fenv for i386, and sparc64; from matthew@martynas2-0/+849
not reviewed yet, but it's better to track changes in cvs
2011-04-24fenv for armmartynas1-0/+269
2011-04-23Implement C99 floating-point environment for Alpha.martynas1-0/+362
Delivering FPE with non-masked exceptions doesn't work on Alpha; I suspect there's a bug in the kernel trap handler. FE_INEXACT is intentionally left out of FE_ALL_EXCEPT; since the inexact exception is not being maintained. Otherwise it will lead to the bogus results.