Patchwork target-xtensa: add in_asm logging

login
register
mail settings
Submitter Max Filippov
Date Aug. 24, 2013, 7:42 p.m.
Message ID <1377373341-10543-1-git-send-email-jcmvbkbc@gmail.com>
Download mbox | patch
Permalink /patch/269659/
State New
Headers show

Comments

Max Filippov - Aug. 24, 2013, 7:42 p.m.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
 target-xtensa/translate.c | 8 ++++++++
 1 file changed, 8 insertions(+)
Richard Henderson - Aug. 26, 2013, 5:44 p.m.
On 08/24/2013 12:42 PM, Max Filippov wrote:
> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
> ---
>  target-xtensa/translate.c | 8 ++++++++
>  1 file changed, 8 insertions(+)

Reviewed-by: Richard Henderson <rth@twiddle.net>

Excellent, thanks.  That was the only target that did not call in for IN_ASM
dumping.


r~

Patch

diff --git a/target-xtensa/translate.c b/target-xtensa/translate.c
index 504cc53..c82d988 100644
--- a/target-xtensa/translate.c
+++ b/target-xtensa/translate.c
@@ -3018,6 +3018,14 @@  void gen_intermediate_code_internal(XtensaCPU *cpu,
     gen_tb_end(tb, insn_count);
     *tcg_ctx.gen_opc_ptr = INDEX_op_end;
 
+#ifdef DEBUG_DISAS
+    if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
+        qemu_log("----------------\n");
+        qemu_log("IN: %s\n", lookup_symbol(pc_start));
+        log_target_disas(env, pc_start, dc.pc - pc_start, 0);
+        qemu_log("\n");
+    }
+#endif
     if (search_pc) {
         j = tcg_ctx.gen_opc_ptr - tcg_ctx.gen_opc_buf;
         memset(tcg_ctx.gen_opc_instr_start + lj + 1, 0,