]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
opcodes/riscv: style csr names as registers
authorAndrew Burgess <aburgess@redhat.com>
Mon, 3 Oct 2022 09:59:57 +0000 (10:59 +0100)
committerAndrew Burgess <aburgess@redhat.com>
Tue, 4 Oct 2022 08:51:24 +0000 (09:51 +0100)
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

index 6ac69490b78a2df497fff8997160a28e7f2a74e3..031c19334fa39f8a22fd9221d2b17470d03fec96 100644 (file)
@@ -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;