public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb] RISC-V: Fix immediates to have "immediate" style
@ 2022-10-06  3:35 Tsukasa OI
  0 siblings, 0 replies; only message in thread
From: Tsukasa OI @ 2022-10-06  3:35 UTC (permalink / raw)
  To: bfd-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9a76ca16e8fa693dafee8b64b45f25ab667c622d

commit 9a76ca16e8fa693dafee8b64b45f25ab667c622d
Author: Tsukasa OI <research_trasio@irq.a4lg.com>
Date:   Tue Aug 2 17:42:44 2022 +0900

    RISC-V: Fix immediates to have "immediate" style
    
    This commit fixes certain print calls on immediate operands to have
    dis_style_immediate.
    
    opcodes/ChangeLog:
    
            * riscv-dis.c (print_insn_args): Fix immediates to have
            "immediate" style.  (riscv_disassemble_data): Likewise.

Diff:
---
 opcodes/riscv-dis.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/opcodes/riscv-dis.c b/opcodes/riscv-dis.c
index 2c0aed13e75..0070b2323c0 100644
--- a/opcodes/riscv-dis.c
+++ b/opcodes/riscv-dis.c
@@ -480,7 +480,7 @@ print_insn_args (const char *oparg, insn_t l, bfd_vma pc, disassemble_info *info
 	  break;
 
 	case 'y':
-	  print (info->stream, dis_style_text, "0x%x",
+	  print (info->stream, dis_style_immediate, "0x%x",
 		 (int)EXTRACT_OPERAND (BS, l));
 	  break;
 
@@ -550,17 +550,17 @@ print_insn_args (const char *oparg, insn_t l, bfd_vma pc, disassemble_info *info
 	      print (info->stream, dis_style_register, "%s",
 		     riscv_csr_hash[csr]);
 	    else
-	      print (info->stream, dis_style_text, "0x%x", csr);
+	      print (info->stream, dis_style_immediate, "0x%x", csr);
 	    break;
 	  }
 
 	case 'Y':
-	  print (info->stream, dis_style_text, "0x%x",
+	  print (info->stream, dis_style_immediate, "0x%x",
 		 (int) EXTRACT_OPERAND (RNUM, l));
 	  break;
 
 	case 'Z':
-	  print (info->stream, dis_style_text, "%d", rs1);
+	  print (info->stream, dis_style_immediate, "%d", rs1);
 	  break;
 
 	case 'X': /* Integer immediate.  */
@@ -964,7 +964,7 @@ riscv_disassemble_data (bfd_vma memaddr ATTRIBUTE_UNUSED,
       (*info->fprintf_styled_func)
 	(info->stream, dis_style_assembler_directive, ".byte\t");
       (*info->fprintf_styled_func)
-	(info->stream, dis_style_assembler_directive, "0x%02llx",
+	(info->stream, dis_style_immediate, "0x%02llx",
 	 (unsigned long long) data);
       break;
     case 2:

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-06  3:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-06  3:35 [binutils-gdb] RISC-V: Fix immediates to have "immediate" style Tsukasa OI

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).