0014-resolve-crash-issue-when-objdump-encounter-unrecogni.patch 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. From 86c531ca0575841766e539f556436275ec782fe7 Mon Sep 17 00:00:00 2001
  2. From: "max.ma" <max.ma@starfivetech.com>
  3. Date: Tue, 22 Jun 2021 00:40:19 -0700
  4. Subject: [PATCH 14/28] resolve crash issue when objdump encounter unrecognized
  5. v instruction
  6. ---
  7. opcodes/riscv-opc.c | 12 ++++++------
  8. 1 file changed, 6 insertions(+), 6 deletions(-)
  9. diff --git a/opcodes/riscv-opc.c b/opcodes/riscv-opc.c
  10. index 230bbdf11e..13ed6500ac 100644
  11. --- a/opcodes/riscv-opc.c
  12. +++ b/opcodes/riscv-opc.c
  13. @@ -553,12 +553,12 @@ match_vd_neq_vs1_neq_vs2_neq_vm (const struct riscv_opcode *op,
  14. if (!constraints || error == NULL)
  15. return match_opcode (op, insn);
  16. - if (vs1 == vd)
  17. - *error = "illegal operands vd cannot overlap vs1";
  18. - else if (vs2 == vd)
  19. - *error = "illegal operands vd cannot overlap vs2";
  20. - else if (!vm && vm == vd)
  21. - *error = "illegal operands vd cannot overlap vm";
  22. + if (vs1 == vd) return 0;
  23. + //*error = "illegal operands vd cannot overlap vs1";
  24. + else if (vs2 == vd) return 0;
  25. + //*error = "illegal operands vd cannot overlap vs2";
  26. + else if (!vm && vm == vd) return 0;
  27. + //*error = "illegal operands vd cannot overlap vm";
  28. else
  29. return match_opcode (op, insn);
  30. return 0;
  31. --
  32. 2.33.0