[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 28/29] target/loongarch: honour show_opcodes when disassembling
From: |
Alex Bennée |
Subject: |
[PULL 28/29] target/loongarch: honour show_opcodes when disassembling |
Date: |
Wed, 6 Mar 2024 14:40:40 +0000 |
This makes the output suitable when used for plugins.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20240305121005.3528075-29-alex.bennee@linaro.org>
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
- [PULL 14/29] plugins: scoreboard API, (continued)
- [PULL 14/29] plugins: scoreboard API, Alex Bennée, 2024/03/06
- [PULL 15/29] plugins: define qemu_plugin_u64, Alex Bennée, 2024/03/06
- [PULL 13/29] tests/tcg: Add two follow-fork-mode tests, Alex Bennée, 2024/03/06
- [PULL 17/29] plugins: add inline operation per vcpu, Alex Bennée, 2024/03/06
- [PULL 25/29] plugins: cleanup codepath for previous inline operation, Alex Bennée, 2024/03/06
- [PULL 24/29] plugins: remove non per_vcpu inline operation from API, Alex Bennée, 2024/03/06
- [PULL 23/29] contrib/plugins/howvec: migrate to new per_vcpu API, Alex Bennée, 2024/03/06
- [PULL 29/29] target/riscv: honour show_opcodes when disassembling, Alex Bennée, 2024/03/06
- [PULL 21/29] tests/plugin/bb: migrate to new per_vcpu API, Alex Bennée, 2024/03/06
- [PULL 20/29] tests/plugin/insn: migrate to new per_vcpu API, Alex Bennée, 2024/03/06
- [PULL 28/29] target/loongarch: honour show_opcodes when disassembling,
Alex Bennée <=
- [PULL 22/29] contrib/plugins/hotblocks: migrate to new per_vcpu API, Alex Bennée, 2024/03/06
- [PULL 26/29] disas: introduce show_opcodes, Alex Bennée, 2024/03/06
- [PULL 27/29] disas/hppa: honour show_opcodes, Alex Bennée, 2024/03/06
- Re: [PULL for 9.0 00/29] maintainer updates (tests, gdbstub, plugins), Peter Maydell, 2024/03/07