[gcc(refs/users/meissner/heads/work096)] Mangle __ibm128 to u8__ibm128.

Michael Meissner meissner@gcc.gnu.org
Wed Aug 3 15:35:27 GMT 2022


https://gcc.gnu.org/g:15da4be5576ba170253355cd59c7be9b15862ae3

commit 15da4be5576ba170253355cd59c7be9b15862ae3
Author: Michael Meissner <meissner@linux.ibm.com>
Date:   Wed Aug 3 11:35:05 2022 -0400

    Mangle __ibm128 to u8__ibm128.
    
    With the change to __ibm128 having a distinct type within GCC, we need to adjust
    the mangling for __ibm128 to distinguish it from long double, when long double
    uses the IBM 128-bit encoding.
    
    2022-08-03   Michael Meissner  <meissner@linux.ibm.com>
    
    gcc/
    
            * config/rs6000/rs6000.cc (rs6000_mangle_type): Mangle __ibm128 to
            u8__ibm128 if long double uses the IBM 128-bit encoding.

Diff:
---
 gcc/config/rs6000/rs6000.cc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc
index 9066bbe8850..9d79fc0bb69 100644
--- a/gcc/config/rs6000/rs6000.cc
+++ b/gcc/config/rs6000/rs6000.cc
@@ -20068,6 +20068,11 @@ rs6000_mangle_type (const_tree type)
   if (type == bool_int_type_node) return "U6__booli";
   if (type == bool_long_long_type_node) return "U6__boolx";
 
+  /* If long double uses the IBM 128-bit extended format, we need to
+     distinguish between __ibm128 and long double.  */
+  if (type == ibm128_float_type_node && FLOAT128_IBM_P (TFmode))
+    return "u8__ibm128";
+
   if (SCALAR_FLOAT_TYPE_P (type) && FLOAT128_IBM_P (TYPE_MODE (type)))
     return "g";
   if (SCALAR_FLOAT_TYPE_P (type) && FLOAT128_IEEE_P (TYPE_MODE (type)))


More information about the Gcc-cvs mailing list