public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/meissner/heads/work105y)] Update ChangeLog.meissner
@ 2023-01-12 18:43 Michael Meissner
0 siblings, 0 replies; 4+ messages in thread
From: Michael Meissner @ 2023-01-12 18:43 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:2d259915721c6930847e9cbc5c05d10fc0ea7a7e
commit 2d259915721c6930847e9cbc5c05d10fc0ea7a7e
Author: Michael Meissner <meissner@linux.ibm.com>
Date: Thu Jan 12 13:43:49 2023 -0500
Update ChangeLog.meissner
Diff:
---
gcc/ChangeLog.meissner | 71 ++++++++++++++++++++++++++++++++------------------
1 file changed, 46 insertions(+), 25 deletions(-)
diff --git a/gcc/ChangeLog.meissner b/gcc/ChangeLog.meissner
index 266970c0eec..56517d4eca1 100644
--- a/gcc/ChangeLog.meissner
+++ b/gcc/ChangeLog.meissner
@@ -1,48 +1,69 @@
-==================== work105y, patch #2 ====================
+==================== work105y, patch #4 ====================
-PR target/107299: Use _Float128 and _Complex _Float128 types for PowerPC libgcc
+PR target/107299: Update IEEE 128-bit types for PowerPC libgcc
-This patch tells GCC to use the _Float128 and _Complex _Float128 types when
-building the IEEE 128-bit support in libgcc. At the moment, we cannot build
-GCC when the target uses IEEE 128-bit long doubles, such as building the
-compiler for a native Fedora 36 system. The build dies when it is trying to
-build the _mulkc3.c module.
+This patch updates the IEEE 128-bit types in libgcc.
-The _mulkc3 and _divkc3 modules were written before the _Float128 and _Complex
-_Float128 types were available. These routines had to use the mode attributes
-to get access to the __float128 complex type. Unfortunately, with the current
-implementation of __float128, _Float128, and long double in the PowerPC
-backend, this code now breaks if long double is IEEE 128-bit.
+At the moment, we cannot build GCC when the target uses IEEE 128-bit long
+doubles, such as building the compiler for a native Fedora 36 system. The
+build dies when it is trying to build the _mulkc3.c and _divkc3 modules.
-Originally I had hoped that we could fix the underlying problem with the
-compiler. But that has become more complex than than I originally thought. I
-believe the compiler should be fixed to avoid the breakage.
+This patch changes the IEEE 128-bit type (TFtype) in the IEEE 128-bit support
+to use either _Float128 or long double. Previously we would use the __float128
+type. In addition, the TCtype will use the same type along with _Complex.
-This patch is a much simpler patch, and it avoids the problem by allowing the
-machine depenendent parts of libgcc to override the definition of TFtype
-(128-bit IEEE scalar) and TCtype (128-bit IEEE _Complex). This allows us to use
-_Float128 and _Complex _Float128 when long double is IBM extended and plain long
-double when IEEE 128-bit is used. We need to adjust the built-in functions used
-as well.
+I changed the libgcc build so that the IEEE 128-bit support is now compiled
+with -mabi=ieeelongdouble. For the _mulkc3 and _divkc3, I explicitly use long
+double and long double _Complex to avoid type mismatch errors.
+
+While it is desirable to ultimately have __float128 and _Float128 use the same
+internal type and mode within GCC, at present if you use the option
+-mabi=ieeelongdouble, the __float128 type will use the long double type. We
+get an internal compiler error if we combine the signbitf128 built-in with a
+long double type.
+
+I've gone through several iterations of trying to fix this within GCC, and
+there are various problems that have come up. I developed this alternative
+patch that changes libgcc so that it does not tickle the issue. I hope we can
+fix the compiler at some point, but right now, this is preventing people on
+Fedora 36 systems from building compilers where the default long double is IEEE
+128-bit.
2023-01-12 Michael Meissner <meissner@linux.ibm.com>
PR target/107299
- * config/rs6000/_divkc3.c (COPYSIGN): Use the correct built-in depending
- on whether TFmode is _Float128 or long double.
+ * config/rs6000/_divkc3.c (toplevel): Add assertion for building with
+ -mabi=ieeelongdouble. Remove code supporting -mabi=ibmlongdouble.
+ (COPYSIGN): Use the long double built-in.
(INFINITY): Likewise.
(FABS): Likewise.
- * config/rs6000/_mulkc3.c (COPYSIGN): Likewise.
+ * config/rs6000/_mulkc3.c (toplevel): Add assertion for building with
+ -mabi=ieeelongdouble.
+ (COPYSIGN): Use the long double built-in.
(INFINITY): Likewise.
+ * config/rs6000/float128-ifunc.c (toplevel): Add assertion for building
+ with -mabi=ieeelongdouble.
* config/rs6000/quad-float128.h (TF): Delete definition.
(TFtype): Define to be _Float128 or long double.
(TCtype): Define to be _Complex _Float128 or _Complex long double.
- (__mulkc3): Delete definition since these are built-in functions.
+ (__mulkc3_sw): Only declare function if -mabi=ieeelongdouble.
+ (__divkc3_sw): Likewise.
+ (__mulkc3_hw): Likewise.
+ (__divkc3_hw): Likewise.
+ (__mulkc3): Likewise.
(__divkc3): Likewise.
+ * config/rs6000/t-float128 (FP128_CFLAGS_SW): Add -mabi=ieeelongdouble.
+ * config/rs6000/t-float128-hw (FP128_CFLAGS_HW): Likewise.
* libgcc2.h (TFtype): Allow MD code to override definition.
(TCtype): Likewise.
* soft-fp/quad.h (TFtype): Likewise.
+==================== work105y, patch #3 was reverted ====================
+
+==================== work105y, patch #2 was reverted ====================
+
+==================== work105y, patch #1 was reverted ====================
+
==================== work105y branch point ====================
2023-01-11 Michael Meissner <meissner@linux.ibm.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gcc(refs/users/meissner/heads/work105y)] Update ChangeLog.meissner
@ 2023-01-12 6:47 Michael Meissner
0 siblings, 0 replies; 4+ messages in thread
From: Michael Meissner @ 2023-01-12 6:47 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:eb5c87a12b54a10939723e03284e86b543ce31bf
commit eb5c87a12b54a10939723e03284e86b543ce31bf
Author: Michael Meissner <meissner@linux.ibm.com>
Date: Thu Jan 12 01:47:28 2023 -0500
Update ChangeLog.meissner
Diff:
---
gcc/ChangeLog.meissner | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/ChangeLog.meissner b/gcc/ChangeLog.meissner
index f173e8b0ea4..266970c0eec 100644
--- a/gcc/ChangeLog.meissner
+++ b/gcc/ChangeLog.meissner
@@ -27,6 +27,7 @@ as well.
2023-01-12 Michael Meissner <meissner@linux.ibm.com>
+ PR target/107299
* config/rs6000/_divkc3.c (COPYSIGN): Use the correct built-in depending
on whether TFmode is _Float128 or long double.
(INFINITY): Likewise.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gcc(refs/users/meissner/heads/work105y)] Update ChangeLog.meissner
@ 2023-01-12 6:26 Michael Meissner
0 siblings, 0 replies; 4+ messages in thread
From: Michael Meissner @ 2023-01-12 6:26 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:3b25959ef0787d3546e1f55bce5cc3207cb4ddd7
commit 3b25959ef0787d3546e1f55bce5cc3207cb4ddd7
Author: Michael Meissner <meissner@linux.ibm.com>
Date: Thu Jan 12 01:26:31 2023 -0500
Update ChangeLog.meissner
Diff:
---
gcc/ChangeLog.meissner | 41 ++++++++++++++++++++++++++++++++++++-----
1 file changed, 36 insertions(+), 5 deletions(-)
diff --git a/gcc/ChangeLog.meissner b/gcc/ChangeLog.meissner
index 4306117ed91..f173e8b0ea4 100644
--- a/gcc/ChangeLog.meissner
+++ b/gcc/ChangeLog.meissner
@@ -1,12 +1,43 @@
-==================== work105y, patch #1 ====================
+==================== work105y, patch #2 ====================
-Patch libgcc to always use _Float128 and _Complex _Float128 on PowerPC.
+PR target/107299: Use _Float128 and _Complex _Float128 types for PowerPC libgcc
-2023-01-11 Michael Meissner <meissner@linux.ibm.com>
+This patch tells GCC to use the _Float128 and _Complex _Float128 types when
+building the IEEE 128-bit support in libgcc. At the moment, we cannot build
+GCC when the target uses IEEE 128-bit long doubles, such as building the
+compiler for a native Fedora 36 system. The build dies when it is trying to
+build the _mulkc3.c module.
+
+The _mulkc3 and _divkc3 modules were written before the _Float128 and _Complex
+_Float128 types were available. These routines had to use the mode attributes
+to get access to the __float128 complex type. Unfortunately, with the current
+implementation of __float128, _Float128, and long double in the PowerPC
+backend, this code now breaks if long double is IEEE 128-bit.
+
+Originally I had hoped that we could fix the underlying problem with the
+compiler. But that has become more complex than than I originally thought. I
+believe the compiler should be fixed to avoid the breakage.
+
+This patch is a much simpler patch, and it avoids the problem by allowing the
+machine depenendent parts of libgcc to override the definition of TFtype
+(128-bit IEEE scalar) and TCtype (128-bit IEEE _Complex). This allows us to use
+_Float128 and _Complex _Float128 when long double is IBM extended and plain long
+double when IEEE 128-bit is used. We need to adjust the built-in functions used
+as well.
+
+2023-01-12 Michael Meissner <meissner@linux.ibm.com>
+ * config/rs6000/_divkc3.c (COPYSIGN): Use the correct built-in depending
+ on whether TFmode is _Float128 or long double.
+ (INFINITY): Likewise.
+ (FABS): Likewise.
+ * config/rs6000/_mulkc3.c (COPYSIGN): Likewise.
+ (INFINITY): Likewise.
* config/rs6000/quad-float128.h (TF): Delete definition.
- (TFtype): Define to be _Float128.
- (TCtype): Change to be _Complex _Float128.
+ (TFtype): Define to be _Float128 or long double.
+ (TCtype): Define to be _Complex _Float128 or _Complex long double.
+ (__mulkc3): Delete definition since these are built-in functions.
+ (__divkc3): Likewise.
* libgcc2.h (TFtype): Allow MD code to override definition.
(TCtype): Likewise.
* soft-fp/quad.h (TFtype): Likewise.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gcc(refs/users/meissner/heads/work105y)] Update ChangeLog.meissner
@ 2023-01-11 6:46 Michael Meissner
0 siblings, 0 replies; 4+ messages in thread
From: Michael Meissner @ 2023-01-11 6:46 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:1a582dc50b583ed23200909dad817389f3cfe6f7
commit 1a582dc50b583ed23200909dad817389f3cfe6f7
Author: Michael Meissner <meissner@linux.ibm.com>
Date: Wed Jan 11 01:46:38 2023 -0500
Update ChangeLog.meissner
Diff:
---
gcc/ChangeLog.meissner | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/gcc/ChangeLog.meissner b/gcc/ChangeLog.meissner
index 45ef919b3cb..4306117ed91 100644
--- a/gcc/ChangeLog.meissner
+++ b/gcc/ChangeLog.meissner
@@ -1,3 +1,18 @@
+==================== work105y, patch #1 ====================
+
+Patch libgcc to always use _Float128 and _Complex _Float128 on PowerPC.
+
+2023-01-11 Michael Meissner <meissner@linux.ibm.com>
+
+ * config/rs6000/quad-float128.h (TF): Delete definition.
+ (TFtype): Define to be _Float128.
+ (TCtype): Change to be _Complex _Float128.
+ * libgcc2.h (TFtype): Allow MD code to override definition.
+ (TCtype): Likewise.
+ * soft-fp/quad.h (TFtype): Likewise.
+
+==================== work105y branch point ====================
+
2023-01-11 Michael Meissner <meissner@linux.ibm.com>
Clone branch
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-01-12 18:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-12 18:43 [gcc(refs/users/meissner/heads/work105y)] Update ChangeLog.meissner Michael Meissner
-- strict thread matches above, loose matches on Subject: below --
2023-01-12 6:47 Michael Meissner
2023-01-12 6:26 Michael Meissner
2023-01-11 6:46 Michael Meissner
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).