[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 5/6] misc: Add bfd_arch to arm/aarch64/mips
From: |
Kim Kuparinen |
Subject: |
[PATCH 5/6] misc: Add bfd_arch to arm/aarch64/mips |
Date: |
Sat, 20 Nov 2021 13:13:26 +0200 |
When configured with --enable-assertions --enable-disassembler, these
architectures abort at assertion disasm_print.
Signed-off-by: Kim Kuparinen <kimi.h.kuparinen@gmail.com>
---
lib/jit_disasm.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/lib/jit_disasm.c b/lib/jit_disasm.c
index 27a3ed1..bc4a8f6 100644
--- a/lib/jit_disasm.c
+++ b/lib/jit_disasm.c
@@ -133,6 +133,19 @@ jit_init_debug(const char *progname)
# else
disasm_info.mach = bfd_mach_riscv64;
# endif
+# endif
+# if defined(__arm__)
+ /* bfd doesn't seem to be using mach for anything at the moment */
+ disasm_info.arch = bfd_arch_arm;
+ disasm_info.mach = bfd_mach_arm_unknown;
+# endif
+# if defined(__aarch64__)
+ disasm_info.arch = bfd_arch_aarch64;
+ disasm_info.mach = bfd_mach_aarch64;
+# endif
+# if defined(__mips__)
+ disasm_info.arch = bfd_arch_mips;
+ disasm_info.mach = bfd_mach_mips3000;
# endif
disasm_info.print_address_func = disasm_print_address;
--
2.33.0
- [PATCH 0/6] Misc patches to pass the testsuite and remove warnings, Kim Kuparinen, 2021/11/20
- [PATCH 1/6] riscv: Fix movi/relatives loading incorrect value, Kim Kuparinen, 2021/11/20
- [PATCH 2/6] arm: Force RES0 bits in TST/A1 to be 0, Kim Kuparinen, 2021/11/20
- [PATCH 3/6] mips: Use DEXT when in 64-bit mode instead of EXT, Kim Kuparinen, 2021/11/20
- [PATCH 6/6] Include math.h in check/lightning.c, Kim Kuparinen, 2021/11/20
- [PATCH 5/6] misc: Add bfd_arch to arm/aarch64/mips,
Kim Kuparinen <=
- [PATCH 4/6] ppc: Add endianness check to _truncr_d_i, Kim Kuparinen, 2021/11/20
- Re: [PATCH 0/6] Misc patches to pass the testsuite and remove warnings, Kim Kuparinen, 2021/11/20