From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-xe34.google.com (mail-vs1-xe34.google.com [IPv6:2607:f8b0:4864:20::e34]) by sourceware.org (Postfix) with ESMTPS id 91E5F3857815 for ; Thu, 7 Jul 2022 08:59:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 91E5F3857815 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-vs1-xe34.google.com with SMTP id k2so7927118vsc.5 for ; Thu, 07 Jul 2022 01:59:16 -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=wHtSAZL35oSrGgglTyfhtPrASsbmKt4zITRPXskh+X0=; b=aFZ6Q04em0kRGdUvgjr+mczoJkScvXRzteNjkWNz4f2PWlWJjqbT0GGVWH/96EdSuu e1mQZQ9PZng88FuMDXo5pjtKyw0Zz/fTR+Y6PCzvuIWxPSKb3CaYD9ZLmrS8ngdhZ9BY eLhwNMVI16OgAznGFXQI8dVNPzq7tjjW2DIjAe2SsjM9aXkxBjIWXMDXEHV67Ijtc7JA fUSRPrMrbRbITg+qpQ+BJIbFkFt6g7Gf/4PC23gO8nOGoCo/R5tzNJql1PCtzy+RY30n SCamAPO9mgsHQRn9TPyE31a8Zn1OPqfxT5nLt4vS9RiHYeKfTMgFKaBoIlZqdMMePVN7 WKjQ== 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=wHtSAZL35oSrGgglTyfhtPrASsbmKt4zITRPXskh+X0=; b=bBrwIP0bY8dqnVo0hbbH8TZVbx09znI0QGUcNM8H/tREHhZ1QYH2iLDxB4Or9/6nCm 95D5J6TVnRHBwVKkRgOlZjvTFkN4yLa3gvegamfvfvrrwazG+EJx4yixyTdvQa07i8p1 r4vMW//Uv0BYRDV/JEC3OroBOC9sxsDOivfCMDoZADSutb04HgslfZptlI5QjxqFW34T zb37eSn0rgu8AopOMDXKvNAO4rCRgui9X0LOinFuvSAUMgut3Uu3k57MYjWfb06x+I7n SicLJWcqm3AYEDImv0qkuen7WsQYlwg/AWUe0EOmIm1OqAds8T+qnIJShTwBBpdaooFn Nmzw== X-Gm-Message-State: AJIora/YZzuqzXDAzPKj+8lZIwAB4GgBymQ+cUdjteo9lhIINgb8Sbmc zhh2MqopHVzl51tSvx8OTREWMCI0SuMYo3PzsLojgw== X-Google-Smtp-Source: AGRyM1tshE/xpfd/d1Cdmfe6FWP4SrsWlqo6T7i8lf4NQZvlriPHNrElhyy4OYvJnymH5X7YKyB0odHuJ3dT0B7FD/k= X-Received: by 2002:a67:c30f:0:b0:354:45bf:748c with SMTP id r15-20020a67c30f000000b0035445bf748cmr25251111vsj.13.1657184355823; Thu, 07 Jul 2022 01:59:15 -0700 (PDT) MIME-Version: 1.0 References: <20220627020348.11920-1-research_trasio@irq.a4lg.com> <20220627020348.11920-4-research_trasio@irq.a4lg.com> In-Reply-To: From: Nelson Chu Date: Thu, 7 Jul 2022 16:59:05 +0800 Message-ID: Subject: Re: [PATCH v2 3/8] RISC-V: Add Zfhmin/Zhinxmin (with refactoring) To: Andrew Waterman Cc: Kito Cheng , Tsukasa OI , Kito Cheng , Weiwei Li , Binutils Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.8 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, T_SCC_BODY_TEXT_LINE 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jul 2022 08:59:18 -0000 OK, thanks. Fixed conflicts which were caused by the commit 37cf60c6a6d36bbf5cf1523697906c4bdb4eb468, and then committed. Nelson On Thu, Jul 7, 2022 at 2:10 PM Andrew Waterman wrote: > > On Wed, Jul 6, 2022 at 7:57 PM Kito Cheng wrote: > > > > Hi Andrew: > > > > The sound makes sense to me, but personally I would prefer to keep > > fmv.h for zfh to make that consistent with fmv.* :P > > SGTM, the symmetry argument works for me. > > > > > Hi Tsukasa, Nelson: > > > > I am OK with the current version, and verified with GCC. > > > > On Wed, Jul 6, 2022 at 7:19 AM Andrew Waterman wrote: > > > > > > IMO, we should not add this alias for Zfhmin, reason being that it > > > would mean FMV.H has different semantics in Zfhmin vs. Zfh. > > > > > > Yes, the behavior is the same if the input is a NaN-boxed > > > half-precision number, but what if it isn't? Namely, what if the > > > programmer accidentally uses FMV.H to move a single-precision number? > > > This would work correctly when assembling for Zfhmin, but would fail > > > when assembling for Zfh. Obviously, this is a programming error, but > > > it still seems a bit unfortunate to me. > > > > > > (In fact, we could consider deleting the FMV.H alias altogether--even > > > for Zfh. We would then recommend programmers and compilers always use > > > FMV.S to move half-precision floating-point numbers for both Zfh and > > > Zfhmin.) > > > > > > > > > > > > On Tue, Jul 5, 2022 at 7:22 AM Kito Cheng via Binutils > > > wrote: > > > > > > > > > +{"fmv.h", 0, INSN_CLASS_ZFH_OR_ZHINX, "D,U", MATCH_FSGNJ_H, MASK_FSGNJ_H, match_rs1_eq_rs2, INSN_ALIAS }, > > > > Maybe we need one more alias for ZFHMIN? like this: {"fmv.h", 0, > > > > INSN_CLASS_ZFHMIN, "D,U", MATCH_FSGNJ_S, MASK_FSGNJ_S, > > > > match_rs1_eq_rs2, INSN_ALIAS }, > > > > > > > > --- > > > > Spec say: > > > > Zfhmin does not include the FSGNJ.H instruction, because it suffices to > > > > instead use the FSGNJ.S instruction to move half-precision values between > > > > floating-point registers.