summaryrefslogtreecommitdiffstats
path: root/lib/libm/arch (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix ilogb(3) implementation. The results have to match FP_ILOGB0 andkettenis2020-11-074-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@
* The fegetexceptflag() function should not have a DEF_STD.kettenis2020-07-091-2/+1
| | | | | | Brings arm64 in line with all the other architectures. ok millert@
* Add powerpc64 fenv bits; copied from powerpc. From drahn@kettenis2020-06-281-0/+339
|
* Setting and getting the rounding mode on our arm64 FPU has not workedpatrick2019-03-121-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@
* Add missing retguard checkmortimer2018-07-081-1/+2
| | | | ok deraadt
* Add retguard macros to libm assembly.mortimer2018-07-0343-43/+135
| | | | ok deraadt
* Since most (if not all) ARMv8 hardware doesn't actually support trapping ofkettenis2018-03-161-20/+4
| | | | | | | floating-point exceptions, simplify the functions that control the exception masks just like we did on armv7. ok tom@
* Make the binding of rintl, significand, and significandf consistentlyguenther2018-03-124-4/+8
| | | | | | 'weak' in the static libm.a ok deraadt@
* Change floating-point mode/environment control functions to operate onkettenis2018-02-281-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@
* Constants which can go into .rodataderaadt2018-02-052-2/+4
|
* Use 0xcc trapsleds instead of default/nop/0xcc in BTC alignmentsderaadt2017-08-193-13/+9
| | | | don't bother with .text before ENTRY()
* Add support for AArch64. Based on FreeBSD's msun header, modifiedpatrick2017-01-111-0/+284
| | | | to look and feel like our code.
* copysign and copysignf are used within libm, so declare them accordingly.naddy2016-12-224-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@
* Reduce libm's exports and make internal calls go direct.guenther2016-09-12113-157/+410
| | | | | | All dependencies on libc are now via reserved/standardized names. ok kettenis@ millert@ deraadt@
* retire the sparc library codetedu2016-09-011-336/+0
|
* more hppa64 cleaningderaadt2016-05-121-370/+0
|
* more pieces of vaxderaadt2016-03-109-1846/+0
|
* Missing $OpenBSD$'s.krw2015-01-2012-0/+12
| | | | ok deraadt@
* Provide a sparc64 version of sqrtl(3) that simply calls _Qp_sqrt.kettenis2014-09-121-0/+29
| | | | | The generic sqrtl(3) is not nearly accurate enough for quad-precision floating point.
* It's been a quarter century: we can assume volatile is present with that name.guenther2014-04-1828-322/+322
|
* Retire hp300, mvme68k and mvme88k ports. These ports have no users, keepingmiod2014-03-1859-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.
* scalbnf on vax, okay miod@espie2013-08-061-1/+8
|
* Fix atan2f() and hypotf() by actually converting both their arguments to themiod2013-07-152-4/+6
| | | | larger type and passing them both the the double routine.
* add some missing asm functions to vax: long double as aliases to double,espie2013-07-156-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@
* VAX ELF userland bits. Consists mostly of register prefix additions.miod2013-07-059-490/+490
|
* Switch libc and libm to use strong aliases rather than weak aliasesmartynas2013-03-2814-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@.
* Userland bits for m68k/ELF. Mostly addition of register prefixes to themiod2013-02-0259-349/+206
| | | | | assembler instructions, and cope with the few changes in return values location.
* Get rid of the very ugly lint workarounds: LINTLIBRARY, PROTOLIB,martynas2013-01-135-33/+3
| | | | and a few empty files for lint to chew on.
* Switch m88k ports to ELF.miod2013-01-051-26/+26
|
* Provide proper ldexp{f,l} aliases to scalbn{f,l} to match the MI (ld80) code.miod2012-12-302-2/+4
|
* Remove excessive sys/cdefs.h inclusionderaadt2012-12-0516-42/+17
| | | | ok guenther millert kettenis
* Aliases for extended precision were missed on a few functions on hppa.martynas2012-08-235-1/+12
| | | | Reported by Brad, thanks!
* Switch to the SSE code. OK mikeb@.martynas2011-07-092-44/+5
|
* Don't reimplement the same thing twice. OK matthew@.martynas2011-07-093-82/+0
|
* Revert (leaving the complex math part alone). Some stuff is dependingmartynas2011-07-0820-1168/+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-0820-0/+1168
| | | | 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-312-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.
* Trick lint into recording the right prototypes in the llib-lm.lnmartynas2011-05-303-10/+22
| | | | | | | database on platforms without extended-precision floating-point support. Seems like a reasonable approach to millert@.
* Adapt m68k MD functions to extended-precision.martynas2011-05-2811-0/+502
| | | | Go for it miod@.
* Adapt m68k MD functions to single-precision.martynas2011-05-2824-0/+996
| | | | Looked over by miod@.
* Trick GCC (-O2) into actually raising the underflow exception on m88k.martynas2011-04-291-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@.
* ixnay on the nopfaymiod2011-04-281-3/+1
|
* fenv improvements and cleanupsmartynas2011-04-2813-734/+1366
|
* fenv for mips64martynas2011-04-261-0/+316
|
* fenv for sparc; mostly cloned from sparc64martynas2011-04-252-1/+354
|
* fenv for powerpcmartynas2011-04-251-0/+354
|
* fenv for shmartynas2011-04-241-0/+381
|
* fenv for i386, and sparc64; from matthew@martynas2011-04-242-0/+849
| | | | not reviewed yet, but it's better to track changes in cvs
* fenv for armmartynas2011-04-241-0/+269
|
* Implement C99 floating-point environment for Alpha.martynas2011-04-231-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.