Message ID | 20221003101328.1790113-1-aburgess@redhat.com |
---|---|
State | Accepted, archived |
Headers |
Return-Path: <binutils-bounces+ouuuleilei=gmail.com@sourceware.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp876599wrs; Mon, 3 Oct 2022 03:13:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6hgEWRDz8hgIft3ZNFaBtnGLJlCUzz4s4/bwvgn6qxEq0JBN3/SwHpW8XOD2FKWuricMHY X-Received: by 2002:a17:907:a0c6:b0:787:8250:f90e with SMTP id hw6-20020a170907a0c600b007878250f90emr14675130ejc.8.1664792023741; Mon, 03 Oct 2022 03:13:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664792023; cv=none; d=google.com; s=arc-20160816; b=zvRA0tVr/sCgkV65s5JPkzxmh0X4gfgILvclBH0twHxOhPcItdBRqVONgGKvwAtQxG O8kfww5ZXV/cFdARvvt64EfY3/uEsA+CU9SiHody23JloH1iDUintJVbOxquCz8PFGeP eC1ZbybKiMoI7yXBA3KrH6FC9hjXVmGWB5W85ndQ6V1uuMy4AvwUQnc2IYawUkZMPRJX vTlacroDuI7GbJMkEwVJ6t3Jbkh06KgYUhYjL1jW0PCF1Y6W7Lj95TBKQGScF2RgnTgI ZLoDdIc3Yt2hbmxEKOB1YyReRN3w/kc1/MVw5198qzAqgtDvIiduw3iNOv5N7Q9y/R5r WGig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=wWsmN7BGsr9DjCyLspJRDrgNy858QR1ieP2Y/UdjjCM=; b=o253ueG4LIiLx752KbPalpEH9ZGDwLTezKN95D6X6U1x9Yko2K1e0Cb6LFm+sMHKz0 uF/FHrHNGh0Rpu4YQFHiqgdImaY22IOx/hurznyEbk8SZkC+7CpX3UyYsK20MLeosL9G gzMQfVZhrNHvwJwV4tLHzA1yUe4idUOchzyZzjxN6DOnHGx8BQph0tPrs9qJKVvWeZ5T lVwmLfJoOAO9Cl30DesbzH4EZqShBy2ggceEehS5rn5SmKH5aXefi47kCTltu1mYQIza T3owSZoyvY5luHPHjkbpPZGPED/omi/lgdIxTmzyj2vnx3uy5FWbHFbQsyb/FGanxfR3 6IAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b="bj/Q7bu5"; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id b15-20020a1709063f8f00b0073d9c29892csi7085745ejj.939.2022.10.03.03.13.43 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Oct 2022 03:13:43 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b="bj/Q7bu5"; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C921C385AC32 for <ouuuleilei@gmail.com>; Mon, 3 Oct 2022 10:13:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C921C385AC32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1664792022; bh=wWsmN7BGsr9DjCyLspJRDrgNy858QR1ieP2Y/UdjjCM=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=bj/Q7bu5c4uZ9MCSIPAS2Mwu0zkr3nxiJVYsR28U9LBy9c/peYYGJu7wkDiJavSsF SDhOHRIhjUQwJ8pavAyy37q4KRGWe03WBIpngsMLIEebZptxTNYAi1MM6nYJo0oVH8 mNngo3/a1GNjRMRTY6bXVzOIxH5c9TQdSFLHfERg= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 977903858D38 for <binutils@sourceware.org>; Mon, 3 Oct 2022 10:13:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 977903858D38 Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-663-fED9pIYJMuqDcBVI38cEiw-1; Mon, 03 Oct 2022 06:13:32 -0400 X-MC-Unique: fED9pIYJMuqDcBVI38cEiw-1 Received: by mail-wr1-f72.google.com with SMTP id e19-20020adfa453000000b0022e3608df56so535252wra.10 for <binutils@sourceware.org>; Mon, 03 Oct 2022 03:13:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=wWsmN7BGsr9DjCyLspJRDrgNy858QR1ieP2Y/UdjjCM=; b=1d6eFmdw+KZwA0VbKU39nRzglC8ULol9L2iN+ESlBfRuzPQFmXlNszaUUPgyd7/2sI Aso0PWW44anjpmqym2KpcIBFPATN7eeydMxnyJXX1ynhMu8iQA2vz2KG4eR1W2a9n0FS jfmWSDhymYig6vWsC08px/67OAzIo40gCnbCU+lRhJsRHRTjYrBEvtm7KXCtJs7OgVPw P8c0VeU4j4nZWQWOTGgRb5ehCNGBY0wFZApuDD4wRokA/WxgGeJwBt43RcpWvqQmzFDW QeW5Ta0fpzerXbCp+VBgLDDaLGco6/UtFjolNYYjrbRC7TY2ZZWs68VUz3ZTKkyNgDq6 XQ8A== X-Gm-Message-State: ACrzQf0me5B8Wn2Drr8AMdOSFYWB+tuSMk1Nhn6oe4gwpAm9yM65bBRu hkj7xGTY0h8tYFURapfV4bkHs2am6a+ta1sdryixb1NLoCJCVzc+5JXVMaZ9suNjhpG/qpMqlA4 65CYYRDhLYLWjfTselzdqv9l0fDjytMtkTWEH2a6p04fuRe4KsOlrzpDktvNKgSHEzzeOAA== X-Received: by 2002:a7b:c4c7:0:b0:3b4:62b6:b54c with SMTP id g7-20020a7bc4c7000000b003b462b6b54cmr6615076wmk.89.1664792010748; Mon, 03 Oct 2022 03:13:30 -0700 (PDT) X-Received: by 2002:a7b:c4c7:0:b0:3b4:62b6:b54c with SMTP id g7-20020a7bc4c7000000b003b462b6b54cmr6615055wmk.89.1664792010356; Mon, 03 Oct 2022 03:13:30 -0700 (PDT) Received: from localhost (52.72.115.87.dyn.plus.net. [87.115.72.52]) by smtp.gmail.com with ESMTPSA id c10-20020a7bc00a000000b003b49bd61b19sm15864964wmb.15.2022.10.03.03.13.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Oct 2022 03:13:29 -0700 (PDT) To: binutils@sourceware.org Subject: [PATCH] opcodes/riscv: style csr names as registers Date: Mon, 3 Oct 2022 11:13:28 +0100 Message-Id: <20221003101328.1790113-1-aburgess@redhat.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> From: Andrew Burgess via Binutils <binutils@sourceware.org> Reply-To: Andrew Burgess <aburgess@redhat.com> Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" <binutils-bounces+ouuuleilei=gmail.com@sourceware.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1745660960932208739?= X-GMAIL-MSGID: =?utf-8?q?1745660960932208739?= |
Series |
opcodes/riscv: style csr names as registers
|
|
Checks
Context | Check | Description |
---|---|---|
snail/binutils-gdb-check | success | Github commit url |
Commit Message
Andrew Burgess
Oct. 3, 2022, 10:13 a.m. UTC
While reviewing another patch I noticed that RISC-V CSR names are given the text style, not the register style. This patch fixes this mistake. --- opcodes/riscv-dis.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Comments
On 2022/10/03 19:13, Andrew Burgess via Binutils wrote: > While reviewing another patch I noticed that RISC-V CSR names are > given the text style, not the register style. This patch fixes this > mistake. LGTM, from the author of "another patch". I felt it's not obvious as the rest and did not include in the first batch of my patchset. But I can definitely say that it is worth discussing about it and I agree with the change. Thanks, Tsukasa > --- > opcodes/riscv-dis.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/opcodes/riscv-dis.c b/opcodes/riscv-dis.c > index 6ac69490b78..031c19334fa 100644 > --- a/opcodes/riscv-dis.c > +++ b/opcodes/riscv-dis.c > @@ -547,7 +547,8 @@ print_insn_args (const char *oparg, insn_t l, bfd_vma pc, disassemble_info *info > } > > if (riscv_csr_hash[csr] != NULL) > - print (info->stream, dis_style_text, "%s", riscv_csr_hash[csr]); > + print (info->stream, dis_style_register, "%s", > + riscv_csr_hash[csr]); > else > print (info->stream, dis_style_text, "0x%x", csr); > break;
Please commit, thanks. Nelson On Mon, Oct 3, 2022 at 6:14 PM Andrew Burgess via Binutils <binutils@sourceware.org> wrote: > > While reviewing another patch I noticed that RISC-V CSR names are > given the text style, not the register style. This patch fixes this > mistake. > --- > opcodes/riscv-dis.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/opcodes/riscv-dis.c b/opcodes/riscv-dis.c > index 6ac69490b78..031c19334fa 100644 > --- a/opcodes/riscv-dis.c > +++ b/opcodes/riscv-dis.c > @@ -547,7 +547,8 @@ print_insn_args (const char *oparg, insn_t l, bfd_vma pc, disassemble_info *info > } > > if (riscv_csr_hash[csr] != NULL) > - print (info->stream, dis_style_text, "%s", riscv_csr_hash[csr]); > + print (info->stream, dis_style_register, "%s", > + riscv_csr_hash[csr]); > else > print (info->stream, dis_style_text, "0x%x", csr); > break; > -- > 2.25.4 >
Nelson Chu <nelson@rivosinc.com> writes: > Please commit, thanks. > Pushed. Thanks, Andrew > Nelson > > On Mon, Oct 3, 2022 at 6:14 PM Andrew Burgess via Binutils > <binutils@sourceware.org> wrote: >> >> While reviewing another patch I noticed that RISC-V CSR names are >> given the text style, not the register style. This patch fixes this >> mistake. >> --- >> opcodes/riscv-dis.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/opcodes/riscv-dis.c b/opcodes/riscv-dis.c >> index 6ac69490b78..031c19334fa 100644 >> --- a/opcodes/riscv-dis.c >> +++ b/opcodes/riscv-dis.c >> @@ -547,7 +547,8 @@ print_insn_args (const char *oparg, insn_t l, bfd_vma pc, disassemble_info *info >> } >> >> if (riscv_csr_hash[csr] != NULL) >> - print (info->stream, dis_style_text, "%s", riscv_csr_hash[csr]); >> + print (info->stream, dis_style_register, "%s", >> + riscv_csr_hash[csr]); >> else >> print (info->stream, dis_style_text, "0x%x", csr); >> break; >> -- >> 2.25.4 >>
diff --git a/opcodes/riscv-dis.c b/opcodes/riscv-dis.c index 6ac69490b78..031c19334fa 100644 --- a/opcodes/riscv-dis.c +++ b/opcodes/riscv-dis.c @@ -547,7 +547,8 @@ print_insn_args (const char *oparg, insn_t l, bfd_vma pc, disassemble_info *info } if (riscv_csr_hash[csr] != NULL) - print (info->stream, dis_style_text, "%s", riscv_csr_hash[csr]); + print (info->stream, dis_style_register, "%s", + riscv_csr_hash[csr]); else print (info->stream, dis_style_text, "0x%x", csr); break;