aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--benchtests/Makefile4
-rw-r--r--benchtests/fmax-inputs23
-rw-r--r--benchtests/fmin-inputs23
4 files changed, 55 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index fdb68ea..819c09b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2016-12-19 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+ * benchtests/Makefile (bench-math): Add fmin and fmax.
+ (CFLAGS-bench-fmax.c): New rule.
+ (CFLAGS-bench-fmin.c): Likewise.
+ * benchtests/fmax-inputs: New file.
+ * benchtests/fmin-inputs: Likewise.
+
* benchtests/bench-string.h (TEST_FUNCTION): Use name without
parenthesis.
(CMDLINE_PROCESS): Define using function instead of macro.
diff --git a/benchtests/Makefile b/benchtests/Makefile
index ba4d068..2aad3c2 100644
--- a/benchtests/Makefile
+++ b/benchtests/Makefile
@@ -24,7 +24,7 @@ subdir := benchtests
include ../Makeconfig
bench-math := acos acosh asin asinh atan atanh cos cosh exp exp2 log log2 \
- modf pow rint sin sincos sinh sqrt tan tanh
+ modf pow rint sin sincos sinh sqrt tan tanh fmin fmax
bench-pthread := pthread_once
@@ -73,6 +73,8 @@ benchset := $(string-benchset-all) $(stdlib-benchset) $(stdio-common-benchset) \
CFLAGS-bench-ffs.c += -fno-builtin
CFLAGS-bench-ffsll.c += -fno-builtin
CFLAGS-bench-sqrt.c += -fno-builtin
+CFLAGS-bench-fmin.c += -fno-builtin
+CFLAGS-bench-fmax.c += -fno-builtin
bench-malloc := malloc-thread
diff --git a/benchtests/fmax-inputs b/benchtests/fmax-inputs
new file mode 100644
index 0000000..18eb8fe
--- /dev/null
+++ b/benchtests/fmax-inputs
@@ -0,0 +1,23 @@
+## includes: math.h
+## args: double:double
+## ret: double
+78.5, -78.5
+-78.5, 78.5
+0, 78.5
+78.5, 0
+0, -78.5
+-78.5, 0
+__builtin_inf (), 78.5
+__builtin_inf (), -78.5
+78.5, __builtin_inf ()
+-78.5, __builtin_inf ()
+## name: qNaN
+__builtin_nan (""), 78.5
+__builtin_nan (""), -78.5
+78.5, __builtin_nan ("")
+-78.5, __builtin_nan ("")
+## name: sNaN
+__builtin_nans (""), 78.5
+__builtin_nans (""), -78.5
+78.5, __builtin_nans ("")
+-78.5, __builtin_nans ("")
diff --git a/benchtests/fmin-inputs b/benchtests/fmin-inputs
new file mode 100644
index 0000000..18eb8fe
--- /dev/null
+++ b/benchtests/fmin-inputs
@@ -0,0 +1,23 @@
+## includes: math.h
+## args: double:double
+## ret: double
+78.5, -78.5
+-78.5, 78.5
+0, 78.5
+78.5, 0
+0, -78.5
+-78.5, 0
+__builtin_inf (), 78.5
+__builtin_inf (), -78.5
+78.5, __builtin_inf ()
+-78.5, __builtin_inf ()
+## name: qNaN
+__builtin_nan (""), 78.5
+__builtin_nan (""), -78.5
+78.5, __builtin_nan ("")
+-78.5, __builtin_nan ("")
+## name: sNaN
+__builtin_nans (""), 78.5
+__builtin_nans (""), -78.5
+78.5, __builtin_nans ("")
+-78.5, __builtin_nans ("")