From patchwork Wed May 30 12:58:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Segher Boessenkool X-Patchwork-Id: 922788 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-478755-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="RT0NmI76"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40wrJS3C5tz9s1b for ; Wed, 30 May 2018 22:59:03 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id; q=dns; s=default; b=VNGQTI4IVwwK Xtx1A6f9kaGZVe/1K5hvhlWTLDojLhRNEpV8iwtwe2lzI02+C1TxLt+UyQy8rFYX Qn53wQ4i2zJppimZHTahyxnxBPJdKKua7gaLZSp6FWIbfnpIwc3+EQ3v9CpG6vkW MhDoHHhGSHz0Hxe7JBM1+SbzBGbGGNM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id; s=default; bh=qVz/AdFAgkDyIr+Bq0 03bs2C9Zo=; b=RT0NmI76UR1/qEBu4cUlCSbXzAO36HBDNxmws5w+J9ewMHqGky FDfKF40m+/hXbw4CVjkZddcGQ5mwiv4HRvX+tjmgOesPcBRSTH48BQKGRsuLYl10 khxm0FM+YFkz1zNJ4eFIil+gyKq3hLaFzT05cbzZIy5PaR55eVwh2g0Y8= Received: (qmail 3696 invoked by alias); 30 May 2018 12:58:56 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 3672 invoked by uid 89); 30 May 2018 12:58:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY autolearn=ham version=3.3.2 spammy=sk:rs6000_, backporting X-HELO: gcc1-power7.osuosl.org Received: from gcc1-power7.osuosl.org (HELO gcc1-power7.osuosl.org) (140.211.15.137) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 30 May 2018 12:58:52 +0000 Received: by gcc1-power7.osuosl.org (Postfix, from userid 10019) id 4E583124024F; Wed, 30 May 2018 12:58:51 +0000 (UTC) From: Segher Boessenkool To: gcc-patches@gcc.gnu.org Cc: dje.gcc@gmail.com, Segher Boessenkool Subject: [PATCH] rs6000: Fix mangling for 128-bit float Date: Wed, 30 May 2018 12:58:49 +0000 Message-Id: X-IsSubscribed: yes This patch changes the (C++) mangling of the 128-bit float types: __ieee128 becomes u9__ieee128 __ibm128 becomes u8__ieee128 __float128 is not a type anymore IEEE long double becomes u9__ieee128 IBM long double stays g This is a necessary ABI break. It will need backporting to 8, too. Bootstrapped and tested on powerpc64-linux {-m32,-m64} (Power7) and on powerpc64le-linux (Power9). Also tested manually; testsuite patches will follow soon. I'll commit this later today if nothing comes up. Segher 2018-05-30 Segher Boessenkool * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of the 128-bit floating point types. --- gcc/config/rs6000/rs6000.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index fab8ee3..f140816 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -32001,21 +32001,6 @@ 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"; - /* Use a unique name for __float128 rather than trying to use "e" or "g". Use - "g" for IBM extended double, no matter whether it is long double (using - -mabi=ibmlongdouble) or the distinct __ibm128 type. */ - if (TARGET_FLOAT128_TYPE) - { - if (type == ieee128_float_type_node) - return "U10__float128"; - - if (type == ibm128_float_type_node) - return "u8__ibm128"; - - if (TARGET_LONG_DOUBLE_128 && type == long_double_type_node) - return (TARGET_IEEEQUAD) ? "U10__float128" : "g"; - } - /* Mangle IBM extended float long double as `g' (__float128) on powerpc*-linux where long-double-64 previously was the default. */ if (TYPE_MAIN_VARIANT (type) == long_double_type_node @@ -32024,7 +32009,17 @@ rs6000_mangle_type (const_tree type) && !TARGET_IEEEQUAD) return "g"; - /* For all other types, use normal C++ mangling. */ + if (TARGET_FLOAT128_TYPE) + { + if (type == ieee128_float_type_node + || (type == long_double_type_node && TARGET_LONG_DOUBLE_128)) + return "u9__ieee128"; + + if (type == ibm128_float_type_node) + return "u8__ibm128"; + } + + /* For all other types, use the default mangling. */ return NULL; }