[PATCH, V2] Add conversions between _Float128 and Decimal.
Michael Meissner
meissner@linux.ibm.com
Tue Mar 30 03:28:15 GMT 2021
On Sat, Mar 27, 2021 at 04:07:18PM +0100, Florian Weimer wrote:
> This issue is still present.
>
> What about the patch below?
>
> Thanks,
> Florian
>
> rs6000: Do not build _Float128/Decimal routines with --disable-decimal-float
>
> Fixes commit 781183595acba67a37c66f59a0c1d9b5fee7e248 ("Add conversions
> between _Float128 and Decimal.).
>
> libgcc/
> * config/rs6000/t-float128 (fp128_ppc_funcs): Add decimal floating
> point functions for $(decimal_float) only.
>
> diff --git a/libgcc/config/rs6000/t-float128 b/libgcc/config/rs6000/t-float128
> index 6fb1a3d871b..b1f00accdf1 100644
> --- a/libgcc/config/rs6000/t-float128
> +++ b/libgcc/config/rs6000/t-float128
> @@ -37,8 +37,11 @@ ibm128_dec_funcs = _tf_to_sd _tf_to_dd _tf_to_td \
> # New functions for software emulation
> fp128_ppc_funcs = floattikf floatuntikf fixkfti fixunskfti \
> extendkftf2-sw trunctfkf2-sw \
> - sfp-exceptions _mulkc3 _divkc3 _powikf2 \
> - $(fp128_dec_funcs) $(fp128_decstr_funcs)
> + sfp-exceptions _mulkc3 _divkc3 _powikf2
> +
> +ifeq ($(decimal_float),yes)
> +fp128_ppc_funcs += $(fp128_dec_funcs) $(fp128_decstr_funcs)
> +endif
>
> fp128_ppc_src = $(addprefix $(srcdir)/config/rs6000/,$(addsuffix \
> .c,$(fp128_ppc_funcs)))
>
Here is an updated version of the patch that works with the change that I
checked in today. It works on a little endian power9 system with the stage1
builds for 3 compilers built with the 3 different long double types (IEEE, IBM,
64-bit). The bootstrap builds will be starting shortly.
Honor --disable-decimal-float on PowerPC Decimal/Float128 conversions
This patch fixes the problem that the Decimal <-> Float128 conversions
were built even if the user configured GCC with --disable-decimal-float.
libgcc/
2021-03-29 Florian Weimer <fweimer@redhat.com>
Michael Meissner <meissner@linux.ibm.com>
* config/rs6000/t-float128 (fp128_ppc_funcs): Add decimal floating
point functions for $(decimal_float) only.
---
libgcc/config/rs6000/t-float128 | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/libgcc/config/rs6000/t-float128 b/libgcc/config/rs6000/t-float128
index 8b089d4433c..d745f0d82e1 100644
--- a/libgcc/config/rs6000/t-float128
+++ b/libgcc/config/rs6000/t-float128
@@ -33,8 +33,11 @@ ibm128_dec_funcs = _tf_to_sd _tf_to_dd _tf_to_td \
# New functions for software emulation
fp128_ppc_funcs = floattikf floatuntikf fixkfti fixunskfti \
extendkftf2-sw trunctfkf2-sw \
- sfp-exceptions _mulkc3 _divkc3 _powikf2 \
- $(fp128_dec_funcs)
+ sfp-exceptions _mulkc3 _divkc3 _powikf2
+
+ifeq ($(decimal_float),yes)
+fp128_ppc_funcs += $(fp128_dec_funcs)
+endif
fp128_ppc_src = $(addprefix $(srcdir)/config/rs6000/,$(addsuffix \
.c,$(fp128_ppc_funcs)))
--
2.22.0
--
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.ibm.com, phone: +1 (978) 899-4797
More information about the Gcc-patches
mailing list