0003-add-print-parameter-dis_style_immediate.patch 976 B

1234567891011121314151617181920212223242526272829303132
  1. From 74c4b61087e199dbe08b4cea8841c381fb3db18f Mon Sep 17 00:00:00 2001
  2. From: "yilun.xie" <yilun.xie@starfivetech.com>
  3. Date: Tue, 24 Oct 2023 23:55:08 -0700
  4. Subject: [PATCH 3/3] add print parameter dis_style_immediate
  5. ---
  6. opcodes/riscv-dis.c | 6 ++++--
  7. 1 file changed, 4 insertions(+), 2 deletions(-)
  8. diff --git a/opcodes/riscv-dis.c b/opcodes/riscv-dis.c
  9. index 0c9eb0bce8..35c5ccbefb 100644
  10. --- a/opcodes/riscv-dis.c
  11. +++ b/opcodes/riscv-dis.c
  12. @@ -518,11 +518,13 @@ print_insn_args (const char *oparg, insn_t l, bfd_vma pc, disassemble_info *info
  13. break;
  14. case '#':
  15. - print (info->stream, "0x%x", (int)EXTRACT_OPERAND (PREF_TYPE, l));
  16. + print (info->stream, dis_style_immediate, "0x%x",
  17. + (int)EXTRACT_OPERAND (PREF_TYPE, l));
  18. break;
  19. case '+':
  20. - print (info->stream, "0x%x", (int)EXTRACT_OPERAND (PREF_OFFSET, l));
  21. + print (info->stream, dis_style_immediate, "0x%x",
  22. + (int)EXTRACT_OPERAND (PREF_OFFSET, l));
  23. case 'S':
  24. case 'U':
  25. --
  26. 2.25.1