* [PATCH v2] benchtests: Run _Float128 tests only on architectures that support it
@ 2020-09-18 23:13 Arjun Shankar
2020-09-21 8:17 ` Paul Zimmermann
2020-09-23 12:14 ` Florian Weimer
0 siblings, 2 replies; 3+ messages in thread
From: Arjun Shankar @ 2020-09-18 23:13 UTC (permalink / raw)
To: libc-alpha; +Cc: Paul Zimmermann, Florian Weimer, Joseph Myers
From: Arjun Shankar <arjun@redhat.com>
__float128 is a non-standard name and is not available on some architectures
(like aarch64 or s390x) even though they may support the standard _Float128
type. Other architectures (like armv7) don't support quad-precision
floating-point operations at all.
This commit replaces benchtests references to __float128 with _Float128 and
runs the corresponding tests only on architectures that support it.
---
Thanks for looking at v1, Florian, Joseph and Paul.
v2 changes: dropped configure[.ac] changes; used the float128[-alias]-fcts
variables instead.
Tested on armv7hl, i686, x86_64, aarch64, ppc64le, and s390x.
benchtests/Makefile | 6 +++++-
benchtests/expf128-inputs | 4 ++--
benchtests/powf128-inputs | 4 ++--
benchtests/sinf128-inputs | 4 ++--
4 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/benchtests/Makefile b/benchtests/Makefile
index 3095076055..922e2a94b1 100644
--- a/benchtests/Makefile
+++ b/benchtests/Makefile
@@ -25,7 +25,11 @@ bench-math := acos acosh asin asinh atan atanh cos cosh exp exp2 log log2 \
modf pow rint sin sincos sinh sqrt tan tanh fmin fmax fminf \
fmaxf powf trunc truncf roundeven roundevenf expf exp2f logf \
log2f sincosf sinf cosf isnan isinf isfinite hypot logb logbf \
- exp10f expf128 powf128 sinf128
+ exp10f
+
+ifneq (,$(filter yes,$(float128-fcts) $(float128-alias-fcts)))
+bench-math += expf128 powf128 sinf128
+endif
bench-pthread := pthread_once thread_create
diff --git a/benchtests/expf128-inputs b/benchtests/expf128-inputs
index 5b36f8672a..5dc0f4e49b 100644
--- a/benchtests/expf128-inputs
+++ b/benchtests/expf128-inputs
@@ -1,6 +1,6 @@
## includes: math.h
-## args: __float128
-## ret: __float128
+## args: _Float128
+## ret: _Float128
# Random inputs in [-10,10]
## name: workload-random.wrf
0x4.e6f9d6da10d9a422942a89cdfa1p+0L
diff --git a/benchtests/powf128-inputs b/benchtests/powf128-inputs
index 7cbabafff6..6826266ad5 100644
--- a/benchtests/powf128-inputs
+++ b/benchtests/powf128-inputs
@@ -1,6 +1,6 @@
## includes: math.h
-## args: __float128:__float128
-## ret: __float128
+## args: _Float128:_Float128
+## ret: _Float128
# Random inputs in [-10,10] such that x and y are not both negative
## name: workload-random.wrf
0x8.130b31ed5288656428a29cead83p+0L, -0x6.e7ead09b7877a118813b50cfb3c8p+0L
diff --git a/benchtests/sinf128-inputs b/benchtests/sinf128-inputs
index 9aaf312413..01b7533680 100644
--- a/benchtests/sinf128-inputs
+++ b/benchtests/sinf128-inputs
@@ -1,6 +1,6 @@
## includes: math.h
-## args: __float128
-## ret: __float128
+## args: _Float128
+## ret: _Float128
# Random inputs in [-10,10]
## name: workload-random.wrf
0x4.e6f9d6da10d9a422942a89cdfa1p+0
--
2.26.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] benchtests: Run _Float128 tests only on architectures that support it
2020-09-18 23:13 [PATCH v2] benchtests: Run _Float128 tests only on architectures that support it Arjun Shankar
@ 2020-09-21 8:17 ` Paul Zimmermann
2020-09-23 12:14 ` Florian Weimer
1 sibling, 0 replies; 3+ messages in thread
From: Paul Zimmermann @ 2020-09-21 8:17 UTC (permalink / raw)
To: Arjun Shankar; +Cc: libc-alpha, fweimer, joseph
Dear Arjun,
this patch applies cleanly on master, and I've tested it on x86_64 Linux:
make bench works and produces results for expf128, powf128 and sinf128,
as expected. Thus ok on my side. I let Florian and Joseph confirm.
Paul
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] benchtests: Run _Float128 tests only on architectures that support it
2020-09-18 23:13 [PATCH v2] benchtests: Run _Float128 tests only on architectures that support it Arjun Shankar
2020-09-21 8:17 ` Paul Zimmermann
@ 2020-09-23 12:14 ` Florian Weimer
1 sibling, 0 replies; 3+ messages in thread
From: Florian Weimer @ 2020-09-23 12:14 UTC (permalink / raw)
To: Arjun Shankar; +Cc: libc-alpha, Joseph Myers
* Arjun Shankar:
> From: Arjun Shankar <arjun@redhat.com>
>
> __float128 is a non-standard name and is not available on some architectures
> (like aarch64 or s390x) even though they may support the standard _Float128
> type. Other architectures (like armv7) don't support quad-precision
> floating-point operations at all.
>
> This commit replaces benchtests references to __float128 with _Float128 and
> runs the corresponding tests only on architectures that support it.
This looks good to me. Thanks.
Florian
--
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-23 12:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-18 23:13 [PATCH v2] benchtests: Run _Float128 tests only on architectures that support it Arjun Shankar
2020-09-21 8:17 ` Paul Zimmermann
2020-09-23 12:14 ` Florian Weimer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).