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.
This commit is contained in:
parent
a1509b60cf
commit
9a76ca16e8
1 changed files with 5 additions and 5 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue