aboutsummaryrefslogtreecommitdiff
path: root/lib/msun/src/s_fmax.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/msun/src/s_fmax.c')
-rw-r--r--lib/msun/src/s_fmax.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/msun/src/s_fmax.c b/lib/msun/src/s_fmax.c
index 0c234bcc5f7f..5d437fcefc9b 100644
--- a/lib/msun/src/s_fmax.c
+++ b/lib/msun/src/s_fmax.c
@@ -1,5 +1,5 @@
/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ * SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2004 David Schultz <das@FreeBSD.ORG>
* All rights reserved.
@@ -26,14 +26,18 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <float.h>
#include <math.h>
#include "fpmath.h"
+#ifdef USE_BUILTIN_FMAX
+double
+fmax(double x, double y)
+{
+ return (__builtin_fmax(x, y));
+}
+#else
double
fmax(double x, double y)
{
@@ -54,6 +58,7 @@ fmax(double x, double y)
return (x > y ? x : y);
}
+#endif
#if (LDBL_MANT_DIG == 53)
__weak_reference(fmax, fmaxl);