]> git.proxmox.com Git - qemu.git/commitdiff
tcg: Log the contents of the prologue with -d out_asm
authorRichard Henderson <rth@twiddle.net>
Sun, 31 Mar 2013 20:15:19 +0000 (13:15 -0700)
committerAurelien Jarno <aurelien@aurel32.net>
Sat, 27 Apr 2013 00:15:55 +0000 (02:15 +0200)
This makes it easier to verify changes to the code
generating the prologue.

[Aurelien: change the format from %i to %zu]

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg/tcg.c

index 1d8265e72e460aa77b4db46c8ba9d07a31e1e42f..1d8099cca8126ca93aac3d5f0c63ee03ee2d031c 100644 (file)
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -268,6 +268,16 @@ void tcg_prologue_init(TCGContext *s)
     tcg_target_qemu_prologue(s);
     flush_icache_range((tcg_target_ulong)s->code_buf,
                        (tcg_target_ulong)s->code_ptr);
+
+#ifdef DEBUG_DISAS
+    if (qemu_loglevel_mask(CPU_LOG_TB_OUT_ASM)) {
+        size_t size = s->code_ptr - s->code_buf;
+        qemu_log("PROLOGUE: [size=%zu]\n", size);
+        log_disas(s->code_buf, size);
+        qemu_log("\n");
+        qemu_log_flush();
+    }
+#endif
 }
 
 void tcg_set_frame(TCGContext *s, int reg,