about summary refs log tree commit diff
path: root/sysdeps/generic/math-type-macros.h
Commit message (Collapse)AuthorAgeFilesLines
* Convert e_exp2l.c into a templateGabriel F. T. Gomes2017-05-171-0/+1
| | | | | | | | | | | | | | | | | | This patch converts the implementation of exp2l in math/e_exp2l.c into a template in math/e_exp2_template.c, then adjusts Makefile to use this template for long double (the implementations for float and double in sysdeps have higher precedence and are not used). This template can also be used for float128, thus reducing the amount of duplicated code that gets added when adding support the new type. Tested for powerpc64le and s390x. * math/Makefile (libm-calls): Move e_exp2F to gen-libm-calls. (gen-libm-calls): Add e_exp2F to use the template. * math/e_exp2l.c: Rename to math/e_exp2_template.c. * math/e_exp2_template.c: New file, renamed from math/e_exp2l.c, and made into a template. * sysdeps/generic/math-type-macros.h (M_MIN_EXP): New macro.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2017-01-011-1/+1
|
* Build s_nan* objects from a generic templatePaul E. Murphy2016-09-201-0/+3
| | | | | | | This requires adding a macro to synthesize the call to __strto*_nan. Since this is likely to be the only usage ever for strto* functions in generated libm calls, a dedicated macro is defined for it.
* Remove __nan{f,,l} macrosPaul E. Murphy2016-09-201-1/+1
| | | | | | Use the GCC builtin instead. With the exception of the files built from a template, they are unused. This is preparation for making the s_nanF objects generated.
* Make ldexpF generic.Paul E. Murphy2016-09-201-0/+12
| | | | | | | | | | | | | | | | | This one is a little more tricky since it is built both for libm and libc, and exports multiple aliases. To simplify aliasing, a new macro is introduced which handles aliasing to two symbols. By default, it just applies declare_mgen_alias to both target symbols. Likewise, the makefile is tweaked a little to generate templates for shared files too, and a new rule is added to build m_*.c objects from the objpfx directory. Verified there are no symbol or code changes using a script to diff the *_ldexp* object files on s390x, aarch64, arm, x86_64, and ppc64.
* Support for type-generic libm function implementations libmPaul E. Murphy2016-08-171-0/+121
This defines a new classes of libm objects. The <func>_template.c file which is used in conjunction with the new makefile hooks to derive variants for each type supported by the target machine. The headers math-type-macros-TYPE.h are used to supply macros to a common implementation of a function in a file named FUNC_template.c and glued togethor via a generated file matching existing naming in the build directory. This has the properties of preserving the existing override mechanism and not requiring any arcane build system twiddling. Likewise, it enables machines to override these files without any additional work. I have verified the built objects for ppc64, x86_64, alpha, arm, and m68k do not change in any meaningful way with these changes using the Fedora cross toolchains. I have verified the x86_64 and ppc64 changes still run.