aboutsummaryrefslogtreecommitdiff
path: root/accel/tcg/translator.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2024-04-02 23:07:53 -1000
committerRichard Henderson <richard.henderson@linaro.org>2024-05-15 08:55:19 +0200
commitb67c567b79f7f659814d102579d2b503b6d40ed4 (patch)
tree0d8e37d6686b08e16f249387256d9f2312f8f56c /accel/tcg/translator.c
parent962a145cdcd118f19597c08939ca24fd6227bc36 (diff)
accel/tcg: Return bool from TranslatorOps.disas_log
We have eliminated most uses of this hook. Reduce further by allowing the hook to handle only the special cases, returning false for normal processing. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'accel/tcg/translator.c')
-rw-r--r--accel/tcg/translator.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c
index 98d2500c53..ccd22dcd95 100644
--- a/accel/tcg/translator.c
+++ b/accel/tcg/translator.c
@@ -228,9 +228,8 @@ void translator_loop(CPUState *cpu, TranslationBlock *tb, int *max_insns,
if (logfile) {
fprintf(logfile, "----------------\n");
- if (ops->disas_log) {
- ops->disas_log(db, cpu, logfile);
- } else {
+ if (!ops->disas_log ||
+ !ops->disas_log(db, cpu, logfile)) {
fprintf(logfile, "IN: %s\n", lookup_symbol(db->pc_first));
target_disas(logfile, cpu, db->pc_first, db->tb->size);
}