From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk1-xa2f.google.com (mail-vk1-xa2f.google.com [IPv6:2607:f8b0:4864:20::a2f]) by sourceware.org (Postfix) with ESMTPS id B610C385842B for ; Thu, 7 Jul 2022 04:25:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B610C385842B 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-vk1-xa2f.google.com with SMTP id b5so8358767vkp.4 for ; Wed, 06 Jul 2022 21:25:37 -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=F1bfKnlpYBuiONboTDrn+wyETzqxLr+6v+V9MbcToD8=; b=eTckMLcnwUyI6NAfhhGu87e9mH7sGUhFbvWkbMl3+3pD6wF/JMW7RfyJa+T2gzGtvC AIDgXmWgPI1lFgJhSDPgGyU7qxyWbnSLZhN4rC2t+w91YJ14NJk5i7oalwY6dFRS3ejE PBgBI6pivuqw6clF0BnoFTmp2gZ9tD4wIfpIAx9sFmh57uALn8dg6U1vwpf32ncyq58J ENRRhO3KgS31wGmol9dnX0fsambOdTOKlDEi92hUhwmwutbjz7dDrnghI6sJ02B6Wa/S qYITLhxa0BHy4rsJphLBgpmXHj55XZeHuFEgDUQAykCU+yjsDqCbuTt3VlJAlahdcAyV s+8A== 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=F1bfKnlpYBuiONboTDrn+wyETzqxLr+6v+V9MbcToD8=; b=eTjaLwE5bjI/3yqgqoqffULo4E1y6aUp2CYuGNxoPIikLjDsZP8U3r3b2hPbfwgNdv 2AEyeDsmhvzPzkMu4wmfdXCuldWyyAKdWg0My5Nw6K55E+2QyEkm3cSFD34io6OY+J+r CnmTsS2JbAQUEaDlb4RXkyKFlmVEY16bS/AMUxWt/USY3YZte39sQyeBTJjUZZ3Rf7ct ikaw8M7vV/hEJ/NeN7bggnpfKrdXKzWpCGaBWQmE/V9jeqXxiXgWlwHoMgwVKLAPrfpY gvnVtkxKBJH1RTXwq+h7E2yS3SZMmHyKR2qjdMwEc2ptO1fS3dljNRYXynq04HZ0G/do Ocdg== X-Gm-Message-State: AJIora/Q55P/W0FYV6Fe4uUx9rGAirX7d3EX102BNpNq/xP0PvmiE401 uiJXrEe7zPzrN0NwPtMasS68Q48ZqUSbIkUa2mplUw== X-Google-Smtp-Source: AGRyM1svC7kCQEXHG/BpGBGBMo+Pa8IRo8wmkf9kDRjVY2XBFod0BbJryyTIM6ZcjXJiYzyxdddQvNku184OwCrp+Uc= X-Received: by 2002:a1f:2e89:0:b0:374:38ca:1425 with SMTP id u131-20020a1f2e89000000b0037438ca1425mr3843581vku.1.1657167937114; Wed, 06 Jul 2022 21:25:37 -0700 (PDT) MIME-Version: 1.0 References: <20220627020348.11920-1-research_trasio@irq.a4lg.com> <20220627020348.11920-5-research_trasio@irq.a4lg.com> In-Reply-To: From: Nelson Chu Date: Thu, 7 Jul 2022 12:25:26 +0800 Message-ID: Subject: Re: [PATCH v2 4/8] RISC-V: Fix disassembling Zfinx with -M numeric To: Kito Cheng Cc: Tsukasa OI , Weiwei Li , Kito Cheng , Palmer Dabbelt , Binutils Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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 04:25:39 -0000 Committed, thanks. Nelson On Thu, Jul 7, 2022 at 10:58 AM Kito Cheng wrote: > > LGTM > > On Mon, Jun 27, 2022 at 10:08 AM Tsukasa OI via Binutils > wrote: > > > > This commit fixes floating point operand register names from ABI ones > > to dynamically set ones. > > > > gas/ChangeLog: > > > > * testsuite/gas/riscv/zfinx-dis-numeric.s: Test new behavior of > > Zfinx extension and -M numeric disassembler option. > > * testsuite/gas/riscv/zfinx-dis-numeric.d: Likewise. > > > > opcodes/ChangeLog: > > > > * riscv-dis.c (riscv_disassemble_insn): Use dynamically set GPR > > names to disassemble Zfinx instructions. > > --- > > gas/testsuite/gas/riscv/zfinx-dis-numeric.d | 10 ++++++++++ > > gas/testsuite/gas/riscv/zfinx-dis-numeric.s | 2 ++ > > opcodes/riscv-dis.c | 2 +- > > 3 files changed, 13 insertions(+), 1 deletion(-) > > create mode 100644 gas/testsuite/gas/riscv/zfinx-dis-numeric.d > > create mode 100644 gas/testsuite/gas/riscv/zfinx-dis-numeric.s > > > > diff --git a/gas/testsuite/gas/riscv/zfinx-dis-numeric.d b/gas/testsuite/gas/riscv/zfinx-dis-numeric.d > > new file mode 100644 > > index 00000000000..ba3f62295eb > > --- /dev/null > > +++ b/gas/testsuite/gas/riscv/zfinx-dis-numeric.d > > @@ -0,0 +1,10 @@ > > +#as: -march=rv64ima_zfinx > > +#source: zfinx-dis-numeric.s > > +#objdump: -dr -Mnumeric > > + > > +.*:[ ]+file format .* > > + > > +Disassembly of section .text: > > + > > +0+000 : > > +[ ]+[0-9a-f]+:[ ]+a0c5a553[ ]+feq.s[ ]+x10,x11,x12 > > diff --git a/gas/testsuite/gas/riscv/zfinx-dis-numeric.s b/gas/testsuite/gas/riscv/zfinx-dis-numeric.s > > new file mode 100644 > > index 00000000000..b55cbd56b21 > > --- /dev/null > > +++ b/gas/testsuite/gas/riscv/zfinx-dis-numeric.s > > @@ -0,0 +1,2 @@ > > +target: > > + feq.s a0, a1, a2 > > diff --git a/opcodes/riscv-dis.c b/opcodes/riscv-dis.c > > index 9ff31167775..164fd209dbd 100644 > > --- a/opcodes/riscv-dis.c > > +++ b/opcodes/riscv-dis.c > > @@ -639,7 +639,7 @@ riscv_disassemble_insn (bfd_vma memaddr, insn_t word, disassemble_info *info) > > > > /* If arch has ZFINX flags, use gpr for disassemble. */ > > if(riscv_subset_supports (&riscv_rps_dis, "zfinx")) > > - riscv_fpr_names = riscv_gpr_names_abi; > > + riscv_fpr_names = riscv_gpr_names; > > > > for (; op->name; op++) > > { > > -- > > 2.25.1 > >