public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/maskray/grte] Add power9 flag to go with -mfloat128
@ 2021-08-27 23:47 Fangrui Song
  0 siblings, 0 replies; 2+ messages in thread
From: Fangrui Song @ 2021-08-27 23:47 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=773eca8e9ebf3d25b34bf0a6534864dec08c06e3

commit 773eca8e9ebf3d25b34bf0a6534864dec08c06e3
Author: Stan Shebs <stanshebs@google.com>
Date:   Wed Sep 26 13:43:57 2018 -0700

    Add power9 flag to go with -mfloat128

Diff:
---
 sysdeps/powerpc/powerpc64le/Makefile | 80 +++++++++++++++++++-----------------
 1 file changed, 43 insertions(+), 37 deletions(-)

diff --git a/sysdeps/powerpc/powerpc64le/Makefile b/sysdeps/powerpc/powerpc64le/Makefile
index 01957b4a1c..c4d36464be 100644
--- a/sysdeps/powerpc/powerpc64le/Makefile
+++ b/sysdeps/powerpc/powerpc64le/Makefile
@@ -1,6 +1,11 @@
 # When building float128 we need to ensure -mfloat128 is
 # passed to all such object files.
 
+pow9-flag =
+ifeq ($(with-clang),yes)
+pow9-flag = -mcpu=pwr9
+endif
+
 # libgcc requires __tcb_parse_hwcap_and_convert_at_platform when built with
 # a binary128 type.  That symbol is provided by the loader on dynamically
 # linked executables, forcing to link the loader after libgcc link.
@@ -11,18 +16,18 @@ ifeq ($(subdir),math)
 CPPFLAGS += -I../soft-fp
 
 # float128 requires adding a handful of extra flags.
-$(foreach suf,$(all-object-suffixes),%f128$(suf)): CFLAGS += -mfloat128
-$(foreach suf,$(all-object-suffixes),%f128_r$(suf)): CFLAGS += -mfloat128
-$(foreach suf,$(all-object-suffixes),$(objpfx)test-float128%$(suf)): CFLAGS += -mfloat128
-$(foreach suf,$(all-object-suffixes),$(objpfx)test-float64x%$(suf)): CFLAGS += -mfloat128
-$(foreach suf,$(all-object-suffixes),$(objpfx)test-ifloat128%$(suf)): CFLAGS += -mfloat128
-$(foreach suf,$(all-object-suffixes),$(objpfx)test-ifloat64x%$(suf)): CFLAGS += -mfloat128
-CFLAGS-libm-test-support-float128.c += -mfloat128
-CFLAGS-libm-test-support-float64x.c += -mfloat128
-CFLAGS-test-math-iscanonical.cc += -mfloat128
-CFLAGS-test-math-iseqsig.cc += -mfloat128
-CFLAGS-test-math-issignaling.cc += -mfloat128
-CFLAGS-test-math-iszero.cc += -mfloat128
+$(foreach suf,$(all-object-suffixes),%f128$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
+$(foreach suf,$(all-object-suffixes),%f128_r$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
+$(foreach suf,$(all-object-suffixes),$(objpfx)test-float128%$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
+$(foreach suf,$(all-object-suffixes),$(objpfx)test-float64x%$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
+$(foreach suf,$(all-object-suffixes),$(objpfx)test-ifloat128%$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
+$(foreach suf,$(all-object-suffixes),$(objpfx)test-ifloat64x%$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
+CFLAGS-libm-test-support-float128.c += -mfloat128 $(pow9-flag)
+CFLAGS-libm-test-support-float64x.c += -mfloat128 $(pow9-flag)
+CFLAGS-test-math-iscanonical.cc += -mfloat128 $(pow9-flag)
+CFLAGS-test-math-iseqsig.cc += -mfloat128 $(pow9-flag)
+CFLAGS-test-math-issignaling.cc += -mfloat128 $(pow9-flag)
+CFLAGS-test-math-iszero.cc += -mfloat128 $(pow9-flag)
 $(foreach test, \
 	  test-float128% test-ifloat128% test-float64x% test-ifloat64x% \
 	  test-math-iscanonical test-math-iseqsig test-math-issignaling \
@@ -33,21 +38,21 @@ endif
 
 # Append flags to string <-> _Float128 routines.
 ifneq ($(filter $(subdir),wcsmbs stdlib),)
-$(foreach suf,$(all-object-suffixes),%f128$(suf)): CFLAGS += -mfloat128
-$(foreach suf,$(all-object-suffixes),%f128_l$(suf)): CFLAGS += -mfloat128
-$(foreach suf,$(all-object-suffixes),%f128_nan$(suf)): CFLAGS += -mfloat128
-$(foreach suf,$(all-object-suffixes),%float1282mpn$(suf)): CFLAGS += -mfloat128
-$(foreach suf,$(all-object-suffixes),%mpn2float128$(suf)): CFLAGS += -mfloat128
-CFLAGS-bug-strtod.c += -mfloat128
-CFLAGS-bug-strtod2.c += -mfloat128
-CFLAGS-tst-strtod-round.c += -mfloat128
-CFLAGS-tst-wcstod-round.c += -mfloat128
-CFLAGS-tst-strtod-nan-locale.c += -mfloat128
-CFLAGS-tst-wcstod-nan-locale.c += -mfloat128
-CFLAGS-tst-strtod6.c += -mfloat128
-CFLAGS-tst-strfrom.c += -mfloat128
-CFLAGS-tst-strfrom-locale.c += -mfloat128
-CFLAGS-strfrom-skeleton.c += -mfloat128
+$(foreach suf,$(all-object-suffixes),%f128$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
+$(foreach suf,$(all-object-suffixes),%f128_l$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
+$(foreach suf,$(all-object-suffixes),%f128_nan$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
+$(foreach suf,$(all-object-suffixes),%float1282mpn$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
+$(foreach suf,$(all-object-suffixes),%mpn2float128$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
+CFLAGS-bug-strtod.c += -mfloat128 $(pow9-flag)
+CFLAGS-bug-strtod2.c += -mfloat128 $(pow9-flag)
+CFLAGS-tst-strtod-round.c += -mfloat128 $(pow9-flag)
+CFLAGS-tst-wcstod-round.c += -mfloat128 $(pow9-flag)
+CFLAGS-tst-strtod-nan-locale.c += -mfloat128 $(pow9-flag)
+CFLAGS-tst-wcstod-nan-locale.c += -mfloat128 $(pow9-flag)
+CFLAGS-tst-strtod6.c += -mfloat128 $(pow9-flag)
+CFLAGS-tst-strfrom.c += -mfloat128 $(pow9-flag)
+CFLAGS-tst-strfrom-locale.c += -mfloat128 $(pow9-flag)
+CFLAGS-strfrom-skeleton.c += -mfloat128 $(pow9-flag)
 $(foreach test,bug-strtod bug-strtod2 bug-strtod2 tst-strtod-round \
 tst-wcstod-round tst-strtod6 tst-strrom tst-strfrom-locale \
 tst-strtod-nan-locale tst-wcstod-nan-locale \
@@ -58,18 +63,19 @@ strfrom-skeleton,$(objpfx)$(test)): gnulib-tests += $(f128-loader-link)
 # Makefiles (e.g.: wcsmbs/Makefile) override CFLAGS defined by the Makefiles in
 # sysdeps.  This is avoided with the use sysdep-CFLAGS instead of CFLAGS.
 sysdep-CFLAGS += $(sysdep-CFLAGS-$(<F))
-sysdep-CFLAGS-fpioconst.c += -mfloat128
-sysdep-CFLAGS-strtod_l.c += -mfloat128
-sysdep-CFLAGS-strtof_l.c += -mfloat128
-sysdep-CFLAGS-strtold_l.c += -mfloat128
-sysdep-CFLAGS-wcstod_l.c += -mfloat128
-sysdep-CFLAGS-wcstof_l.c += -mfloat128
-sysdep-CFLAGS-wcstold_l.c += -mfloat128
+#  -mllvm -enable-ppc-quad-precision
+sysdep-CFLAGS-fpioconst.c += -mfloat128 $(pow9-flag)
+sysdep-CFLAGS-strtod_l.c += -mfloat128 $(pow9-flag)
+sysdep-CFLAGS-strtof_l.c += -mfloat128 $(pow9-flag)
+sysdep-CFLAGS-strtold_l.c += -mfloat128 $(pow9-flag)
+sysdep-CFLAGS-wcstod_l.c += -mfloat128 $(pow9-flag)
+sysdep-CFLAGS-wcstof_l.c += -mfloat128 $(pow9-flag)
+sysdep-CFLAGS-wcstold_l.c += -mfloat128 $(pow9-flag)
 endif
 
 # Append flags to printf routines.
 ifeq ($(subdir),stdio-common)
-CFLAGS-printf_fp.c = -mfloat128
-CFLAGS-printf_fphex.c = -mfloat128
-CFLAGS-printf_size.c = -mfloat128
+CFLAGS-printf_fp.c = -mfloat128 $(pow9-flag)
+CFLAGS-printf_fphex.c = -mfloat128 $(pow9-flag)
+CFLAGS-printf_size.c = -mfloat128 $(pow9-flag)
 endif


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [glibc/maskray/grte] Add power9 flag to go with -mfloat128
@ 2021-08-28  0:25 Fangrui Song
  0 siblings, 0 replies; 2+ messages in thread
From: Fangrui Song @ 2021-08-28  0:25 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=1e88b203b328983dfe761271c95e6c71ceedc6b3

commit 1e88b203b328983dfe761271c95e6c71ceedc6b3
Author: Stan Shebs <stanshebs@google.com>
Date:   Wed Sep 26 13:43:57 2018 -0700

    Add power9 flag to go with -mfloat128

Diff:
---
 sysdeps/powerpc/powerpc64le/Makefile | 80 +++++++++++++++++++-----------------
 1 file changed, 43 insertions(+), 37 deletions(-)

diff --git a/sysdeps/powerpc/powerpc64le/Makefile b/sysdeps/powerpc/powerpc64le/Makefile
index 01957b4a1c..c4d36464be 100644
--- a/sysdeps/powerpc/powerpc64le/Makefile
+++ b/sysdeps/powerpc/powerpc64le/Makefile
@@ -1,6 +1,11 @@
 # When building float128 we need to ensure -mfloat128 is
 # passed to all such object files.
 
+pow9-flag =
+ifeq ($(with-clang),yes)
+pow9-flag = -mcpu=pwr9
+endif
+
 # libgcc requires __tcb_parse_hwcap_and_convert_at_platform when built with
 # a binary128 type.  That symbol is provided by the loader on dynamically
 # linked executables, forcing to link the loader after libgcc link.
@@ -11,18 +16,18 @@ ifeq ($(subdir),math)
 CPPFLAGS += -I../soft-fp
 
 # float128 requires adding a handful of extra flags.
-$(foreach suf,$(all-object-suffixes),%f128$(suf)): CFLAGS += -mfloat128
-$(foreach suf,$(all-object-suffixes),%f128_r$(suf)): CFLAGS += -mfloat128
-$(foreach suf,$(all-object-suffixes),$(objpfx)test-float128%$(suf)): CFLAGS += -mfloat128
-$(foreach suf,$(all-object-suffixes),$(objpfx)test-float64x%$(suf)): CFLAGS += -mfloat128
-$(foreach suf,$(all-object-suffixes),$(objpfx)test-ifloat128%$(suf)): CFLAGS += -mfloat128
-$(foreach suf,$(all-object-suffixes),$(objpfx)test-ifloat64x%$(suf)): CFLAGS += -mfloat128
-CFLAGS-libm-test-support-float128.c += -mfloat128
-CFLAGS-libm-test-support-float64x.c += -mfloat128
-CFLAGS-test-math-iscanonical.cc += -mfloat128
-CFLAGS-test-math-iseqsig.cc += -mfloat128
-CFLAGS-test-math-issignaling.cc += -mfloat128
-CFLAGS-test-math-iszero.cc += -mfloat128
+$(foreach suf,$(all-object-suffixes),%f128$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
+$(foreach suf,$(all-object-suffixes),%f128_r$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
+$(foreach suf,$(all-object-suffixes),$(objpfx)test-float128%$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
+$(foreach suf,$(all-object-suffixes),$(objpfx)test-float64x%$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
+$(foreach suf,$(all-object-suffixes),$(objpfx)test-ifloat128%$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
+$(foreach suf,$(all-object-suffixes),$(objpfx)test-ifloat64x%$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
+CFLAGS-libm-test-support-float128.c += -mfloat128 $(pow9-flag)
+CFLAGS-libm-test-support-float64x.c += -mfloat128 $(pow9-flag)
+CFLAGS-test-math-iscanonical.cc += -mfloat128 $(pow9-flag)
+CFLAGS-test-math-iseqsig.cc += -mfloat128 $(pow9-flag)
+CFLAGS-test-math-issignaling.cc += -mfloat128 $(pow9-flag)
+CFLAGS-test-math-iszero.cc += -mfloat128 $(pow9-flag)
 $(foreach test, \
 	  test-float128% test-ifloat128% test-float64x% test-ifloat64x% \
 	  test-math-iscanonical test-math-iseqsig test-math-issignaling \
@@ -33,21 +38,21 @@ endif
 
 # Append flags to string <-> _Float128 routines.
 ifneq ($(filter $(subdir),wcsmbs stdlib),)
-$(foreach suf,$(all-object-suffixes),%f128$(suf)): CFLAGS += -mfloat128
-$(foreach suf,$(all-object-suffixes),%f128_l$(suf)): CFLAGS += -mfloat128
-$(foreach suf,$(all-object-suffixes),%f128_nan$(suf)): CFLAGS += -mfloat128
-$(foreach suf,$(all-object-suffixes),%float1282mpn$(suf)): CFLAGS += -mfloat128
-$(foreach suf,$(all-object-suffixes),%mpn2float128$(suf)): CFLAGS += -mfloat128
-CFLAGS-bug-strtod.c += -mfloat128
-CFLAGS-bug-strtod2.c += -mfloat128
-CFLAGS-tst-strtod-round.c += -mfloat128
-CFLAGS-tst-wcstod-round.c += -mfloat128
-CFLAGS-tst-strtod-nan-locale.c += -mfloat128
-CFLAGS-tst-wcstod-nan-locale.c += -mfloat128
-CFLAGS-tst-strtod6.c += -mfloat128
-CFLAGS-tst-strfrom.c += -mfloat128
-CFLAGS-tst-strfrom-locale.c += -mfloat128
-CFLAGS-strfrom-skeleton.c += -mfloat128
+$(foreach suf,$(all-object-suffixes),%f128$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
+$(foreach suf,$(all-object-suffixes),%f128_l$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
+$(foreach suf,$(all-object-suffixes),%f128_nan$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
+$(foreach suf,$(all-object-suffixes),%float1282mpn$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
+$(foreach suf,$(all-object-suffixes),%mpn2float128$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
+CFLAGS-bug-strtod.c += -mfloat128 $(pow9-flag)
+CFLAGS-bug-strtod2.c += -mfloat128 $(pow9-flag)
+CFLAGS-tst-strtod-round.c += -mfloat128 $(pow9-flag)
+CFLAGS-tst-wcstod-round.c += -mfloat128 $(pow9-flag)
+CFLAGS-tst-strtod-nan-locale.c += -mfloat128 $(pow9-flag)
+CFLAGS-tst-wcstod-nan-locale.c += -mfloat128 $(pow9-flag)
+CFLAGS-tst-strtod6.c += -mfloat128 $(pow9-flag)
+CFLAGS-tst-strfrom.c += -mfloat128 $(pow9-flag)
+CFLAGS-tst-strfrom-locale.c += -mfloat128 $(pow9-flag)
+CFLAGS-strfrom-skeleton.c += -mfloat128 $(pow9-flag)
 $(foreach test,bug-strtod bug-strtod2 bug-strtod2 tst-strtod-round \
 tst-wcstod-round tst-strtod6 tst-strrom tst-strfrom-locale \
 tst-strtod-nan-locale tst-wcstod-nan-locale \
@@ -58,18 +63,19 @@ strfrom-skeleton,$(objpfx)$(test)): gnulib-tests += $(f128-loader-link)
 # Makefiles (e.g.: wcsmbs/Makefile) override CFLAGS defined by the Makefiles in
 # sysdeps.  This is avoided with the use sysdep-CFLAGS instead of CFLAGS.
 sysdep-CFLAGS += $(sysdep-CFLAGS-$(<F))
-sysdep-CFLAGS-fpioconst.c += -mfloat128
-sysdep-CFLAGS-strtod_l.c += -mfloat128
-sysdep-CFLAGS-strtof_l.c += -mfloat128
-sysdep-CFLAGS-strtold_l.c += -mfloat128
-sysdep-CFLAGS-wcstod_l.c += -mfloat128
-sysdep-CFLAGS-wcstof_l.c += -mfloat128
-sysdep-CFLAGS-wcstold_l.c += -mfloat128
+#  -mllvm -enable-ppc-quad-precision
+sysdep-CFLAGS-fpioconst.c += -mfloat128 $(pow9-flag)
+sysdep-CFLAGS-strtod_l.c += -mfloat128 $(pow9-flag)
+sysdep-CFLAGS-strtof_l.c += -mfloat128 $(pow9-flag)
+sysdep-CFLAGS-strtold_l.c += -mfloat128 $(pow9-flag)
+sysdep-CFLAGS-wcstod_l.c += -mfloat128 $(pow9-flag)
+sysdep-CFLAGS-wcstof_l.c += -mfloat128 $(pow9-flag)
+sysdep-CFLAGS-wcstold_l.c += -mfloat128 $(pow9-flag)
 endif
 
 # Append flags to printf routines.
 ifeq ($(subdir),stdio-common)
-CFLAGS-printf_fp.c = -mfloat128
-CFLAGS-printf_fphex.c = -mfloat128
-CFLAGS-printf_size.c = -mfloat128
+CFLAGS-printf_fp.c = -mfloat128 $(pow9-flag)
+CFLAGS-printf_fphex.c = -mfloat128 $(pow9-flag)
+CFLAGS-printf_size.c = -mfloat128 $(pow9-flag)
 endif


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-28  0:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-27 23:47 [glibc/maskray/grte] Add power9 flag to go with -mfloat128 Fangrui Song
2021-08-28  0:25 Fangrui Song

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).