mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 12:30:06 +00:00
math: Add math-use-builtinds-fmin.h
It allows the architecture to use the builtin instead of generic implementation.
This commit is contained in:
parent
72ab1eaec7
commit
583c4d424e
@ -17,11 +17,15 @@
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <math.h>
|
||||
#include <math-use-builtins.h>
|
||||
|
||||
|
||||
FLOAT
|
||||
M_DECL_FUNC (__fmin) (FLOAT x, FLOAT y)
|
||||
{
|
||||
#if M_USE_BUILTIN (FMIN)
|
||||
return M_SUF (__builtin_fmin) (x, y);
|
||||
#else
|
||||
if (islessequal (x, y))
|
||||
return x;
|
||||
else if (isgreater (x, y))
|
||||
@ -30,5 +34,6 @@ M_DECL_FUNC (__fmin) (FLOAT x, FLOAT y)
|
||||
return x + y;
|
||||
else
|
||||
return isnan (y) ? x : y;
|
||||
#endif
|
||||
}
|
||||
declare_mgen_alias (__fmin, fmin);
|
||||
|
4
sysdeps/generic/math-use-builtins-fmin.h
Normal file
4
sysdeps/generic/math-use-builtins-fmin.h
Normal file
@ -0,0 +1,4 @@
|
||||
#define USE_FMIN_BUILTIN 0
|
||||
#define USE_FMINF_BUILTIN 0
|
||||
#define USE_FMINL_BUILTIN 0
|
||||
#define USE_FMINF128_BUILTIN 0
|
@ -35,5 +35,6 @@
|
||||
#include <math-use-builtins-sqrt.h>
|
||||
#include <math-use-builtins-fma.h>
|
||||
#include <math-use-builtins-fmax.h>
|
||||
#include <math-use-builtins-fmin.h>
|
||||
|
||||
#endif /* MATH_USE_BUILTINS_H */
|
||||
|
Loading…
Reference in New Issue
Block a user