From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x33.google.com (mail-oa1-x33.google.com [IPv6:2001:4860:4864:20::33]) by sourceware.org (Postfix) with ESMTPS id 00C1F3857000 for ; Wed, 27 Jul 2022 09:34:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 00C1F3857000 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-10bd4812c29so21836382fac.11 for ; Wed, 27 Jul 2022 02:34:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/rl4sDLg2m7sJcmDolGgjOtJu21HaifREyhcvNXh+xs=; b=eGZQVZEhR5mfsBxYr6BkOsw7aDHojQin4MS9TO5DLnvlmNhlFJQpAPToJkZzi8ROrg bDuBsIgcJCZ1mrESNcfPxAjNTGOjK3kh9EANHdS9FM+/zxeWtZ/L1w4nltrXEiL1BDx7 YrQ+VXgsqN5pNJQhbxVOJJq0fJl9HG03PFX6hslxo/GPzPO4HIk8YO2RDKRjVTadYAbu 9MhR9W0+mOzGtrDwQdI1Ievn5WfNm3Z1MW37wSW3Vs3PAAowznQza26aeR39ntEee7Hi rauQ7TusKbG4UTLRPDWGj+QHt2v1m2AGZRv0jWm0xCOEkMtNtguN9OdPwAkuWqW+QNzE TYGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/rl4sDLg2m7sJcmDolGgjOtJu21HaifREyhcvNXh+xs=; b=fRWW1Ui2FMm6a0dZ1LsyA7pbu/su4MEzi+Dkl3h4+Cn+L+vZRoFKiYB306Yq1obJVl mHsEb6hTQDaQfqh4VuGcfKAkqnX8WdDcaaA5XrITyrO/InBS35Y4DYPpc+Q1gNobZ6lB IJm3hlk0ZUj3vI7JIDsjvkifu9xHNpZM5nweBXrXwCcJwpmlftf5SmtotSobWTtDjRPc T2HDzImm3Ecinf5x+mRtiUFr001k33weR219Xjz6HqZmh44c3pg03z+jEMt/zaitXSWj s0gCkAn7BmM6Pb8xymfPdA+dtxbKjn9TDS9fcAl2ZRvYCNv2xBlZ2LfZJrlyUd5kymAH YuCA== X-Gm-Message-State: AJIora+X77NV54o/CXAtkSITVtf+5vF03BGKKN8XFtYYlYkSmuqECSPv KVaEZ1GsXRU12hsolmXn6CeUi2SQeP5E5MhNoWGimA== X-Google-Smtp-Source: AGRyM1vZLKj3BesekiCP0yxxq5OVG6Rb8k3TBeBCOrJmKEzaMgiqLHeUtRDIGwcgh6ISktMWxm2SLopwjqmYObz9TY0= X-Received: by 2002:a05:6870:238a:b0:10c:29cd:1b4a with SMTP id e10-20020a056870238a00b0010c29cd1b4amr1546276oap.18.1658914484272; Wed, 27 Jul 2022 02:34:44 -0700 (PDT) MIME-Version: 1.0 References: <20220707085231.68930-1-kito.cheng@sifive.com> <20220707085231.68930-2-kito.cheng@sifive.com> In-Reply-To: From: Kito Cheng Date: Wed, 27 Jul 2022 17:34:35 +0800 Message-ID: Subject: Re: [PATCH 1/2] RISC-V: Support _Float16 type. To: Joseph Myers Cc: GCC Patches , Kito Cheng , Jim Wilson , Palmer Dabbelt , Andrew Waterman , "juzhe.zhong" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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: Wed, 27 Jul 2022 09:34:46 -0000 Hi Joseph: On Wed, Jul 27, 2022 at 5:42 AM Joseph Myers wrote: > > 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? Oh, thanks for catching this, we intend to use DF16_, the patch comes from downstream which used __fp16 before, but we decided to use _Float16 as RISC-V official half-precision floating point later. > -- > Joseph S. Myers > joseph@codesourcery.com