From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id A751E3858C56 for ; Tue, 26 Jul 2022 21:42:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A751E3858C56 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.93,194,1654588800"; d="scan'208";a="80327215" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 26 Jul 2022 13:42:46 -0800 IronPort-SDR: nuGZUeWnKM35PP+w8NgB6Ty/D2GisdCRIIknakp4NYCvprpb3224TXmwjNtDJH0U5avmZAn6uX YNMHbAjpd78ZevaSBz1s+KNkv08cNNI0padKEEnPWrBABEMdbCzvl/54qjKpinrauLV/g84fSc sIMTOQ41fxNhKiYkdY9OLJpZM+cJX5h6EHsiaiSITIaGw5fSraEd/2nXdWbNWygUkVva9ve9+2 lHQxFckk+ea0wHL7GctrZz1Z99Y01wlBwWYDueQaBaKffmvEsnfNKOh+FUenPvR1YkW/xsiBCQ DI4= Date: Tue, 26 Jul 2022 21:42:39 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Kito Cheng CC: , , , , , Subject: Re: [PATCH 1/2] RISC-V: Support _Float16 type. In-Reply-To: <20220707085231.68930-2-kito.cheng@sifive.com> Message-ID: References: <20220707085231.68930-1-kito.cheng@sifive.com> <20220707085231.68930-2-kito.cheng@sifive.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-15.mgc.mentorg.com (139.181.222.15) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3112.2 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2022 21:42:49 -0000 On Thu, 7 Jul 2022, Kito Cheng wrote: > +/* Implement TARGET_MANGLE_TYPE. */ > + > +static const char * > +riscv_mangle_type (const_tree type) > +{ > + /* Half-precision float. */ > + if (TREE_CODE (type) == REAL_TYPE && TYPE_PRECISION (type) == 16) > + return "Dh"; Are you sure you wish to use "Dh" instead of "DF16_" used on x86? The C++ ABI lists both ::= Dh # IEEE 754r half-precision floating point (16 bits) ::= DF _ # ISO/IEC TS 18661 binary floating point type _FloatN (N bits) without distinguishing which should be used when - maybe the choice made for _Float16 on RISC-V needs documenting in the RISC-V psABI? -- Joseph S. Myers joseph@codesourcery.com