[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 28/29] target/loongarch: honour show_opcodes when disassembling
From: |
Alex Bennée |
Subject: |
[PATCH 28/29] target/loongarch: honour show_opcodes when disassembling |
Date: |
Tue, 5 Mar 2024 12:10:04 +0000 |
This makes the output suitable when used for plugins.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
target/loongarch/disas.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/target/loongarch/disas.c b/target/loongarch/disas.c
index 2040f3e44db..63989a6282d 100644
--- a/target/loongarch/disas.c
+++ b/target/loongarch/disas.c
@@ -120,10 +120,15 @@ static const char *get_csr_name(unsigned num)
csr_names[num] : "Undefined CSR";
}
-#define output(C, INSN, FMT, ...) \
-{ \
- (C)->info->fprintf_func((C)->info->stream, "%08x %-9s\t" FMT, \
- (C)->insn, INSN, ##__VA_ARGS__); \
+#define output(C, INSN, FMT, ...) \
+ { \
+ if ((C)->info->show_opcodes) { \
+ (C)->info->fprintf_func((C)->info->stream, "%08x %-9s\t" FMT,\
+ (C)->insn, INSN, ##__VA_ARGS__); \
+ } else { \
+ (C)->info->fprintf_func((C)->info->stream, "%-9s\t" FMT, \
+ INSN, ##__VA_ARGS__); \
+ } \
}
#include "decode-insns.c.inc"
--
2.39.2
- [PATCH 15/29] plugins: define qemu_plugin_u64, (continued)
- [PATCH 15/29] plugins: define qemu_plugin_u64, Alex Bennée, 2024/03/05
- [PATCH 08/29] gdbstub: Call gdbserver_fork() both in parent and in child, Alex Bennée, 2024/03/05
- [PATCH 23/29] contrib/plugins/howvec: migrate to new per_vcpu API, Alex Bennée, 2024/03/05
- [PATCH 17/29] plugins: add inline operation per vcpu, Alex Bennée, 2024/03/05
- [PATCH 29/29] target/riscv: honour show_opcodes when disassembling, Alex Bennée, 2024/03/05
- [PATCH 26/29] disas: introduce show_opcodes, Alex Bennée, 2024/03/05
- [PATCH 18/29] tests/plugin: add test plugin for inline operations, Alex Bennée, 2024/03/05
- [PATCH 22/29] contrib/plugins/hotblocks: migrate to new per_vcpu API, Alex Bennée, 2024/03/05
- [PATCH 28/29] target/loongarch: honour show_opcodes when disassembling,
Alex Bennée <=
- [PATCH 25/29] plugins: cleanup codepath for previous inline operation, Alex Bennée, 2024/03/05
- [PATCH 21/29] tests/plugin/bb: migrate to new per_vcpu API, Alex Bennée, 2024/03/05
- [PATCH 24/29] plugins: remove non per_vcpu inline operation from API, Alex Bennée, 2024/03/05
- [PATCH 19/29] tests/plugin/mem: migrate to new per_vcpu API, Alex Bennée, 2024/03/05
- [PATCH 27/29] disas/hppa: honour show_opcodes, Alex Bennée, 2024/03/05
- [PATCH 20/29] tests/plugin/insn: migrate to new per_vcpu API, Alex Bennée, 2024/03/05