From: "Alex Bennée" <alex.bennee@linaro.org>
To: Richard Henderson <rth@twiddle.net>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] target-*: dfilter support for in_asm
Date: Sun, 05 Jun 2016 10:05:43 +0100 [thread overview]
Message-ID: <8737os3t08.fsf@linaro.org> (raw)
In-Reply-To: <1464994984-19498-1-git-send-email-rth@twiddle.net>
Richard Henderson <rth@twiddle.net> writes:
> The arm target was handled by 06486077, but other targets
> were ignored. This handles all the rest which actually support
> disassembly (that is, skipping moxie and tilegx).
Sorry about that.
>
> Signed-off-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> target-alpha/translate.c | 3 ++-
> target-cris/translate.c | 3 ++-
> target-i386/translate.c | 3 ++-
> target-lm32/translate.c | 3 ++-
> target-m68k/translate.c | 3 ++-
> target-microblaze/translate.c | 3 ++-
> target-mips/translate.c | 3 ++-
> target-openrisc/translate.c | 3 ++-
> target-ppc/translate.c | 3 ++-
> target-s390x/translate.c | 3 ++-
> target-sh4/translate.c | 3 ++-
> target-sparc/translate.c | 3 ++-
> target-tricore/translate.c | 3 ++-
> target-unicore32/translate.c | 3 ++-
> target-xtensa/translate.c | 3 ++-
> 15 files changed, 30 insertions(+), 15 deletions(-)
>
> diff --git a/target-alpha/translate.c b/target-alpha/translate.c
> index 76dab15..f9b2426 100644
> --- a/target-alpha/translate.c
> +++ b/target-alpha/translate.c
> @@ -2994,7 +2994,8 @@ void gen_intermediate_code(CPUAlphaState *env, struct TranslationBlock *tb)
> tb->icount = num_insns;
>
> #ifdef DEBUG_DISAS
> - if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
> + if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)
> + && qemu_log_in_addr_range(pc_start)) {
> qemu_log("IN: %s\n", lookup_symbol(pc_start));
> log_target_disas(cs, pc_start, ctx.pc - pc_start, 1);
> qemu_log("\n");
> diff --git a/target-cris/translate.c b/target-cris/translate.c
> index 2153ea7..cc51569 100644
> --- a/target-cris/translate.c
> +++ b/target-cris/translate.c
> @@ -3311,7 +3311,8 @@ void gen_intermediate_code(CPUCRISState *env, struct TranslationBlock *tb)
>
> #ifdef DEBUG_DISAS
> #if !DISAS_CRIS
> - if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
> + if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)
> + && qemu_log_in_addr_range(pc_start)) {
> log_target_disas(cs, pc_start, dc->pc - pc_start,
> env->pregs[PR_VR]);
> qemu_log("\nisize=%d osize=%d\n",
> diff --git a/target-i386/translate.c b/target-i386/translate.c
> index bf33e6b..f010022 100644
> --- a/target-i386/translate.c
> +++ b/target-i386/translate.c
> @@ -8354,7 +8354,8 @@ done_generating:
> gen_tb_end(tb, num_insns);
>
> #ifdef DEBUG_DISAS
> - if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
> + if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)
> + && qemu_log_in_addr_range(pc_start)) {
> int disas_flags;
> qemu_log("----------------\n");
> qemu_log("IN: %s\n", lookup_symbol(pc_start));
> diff --git a/target-lm32/translate.c b/target-lm32/translate.c
> index d09d814..526b437 100644
> --- a/target-lm32/translate.c
> +++ b/target-lm32/translate.c
> @@ -1147,7 +1147,8 @@ void gen_intermediate_code(CPULM32State *env, struct TranslationBlock *tb)
> tb->icount = num_insns;
>
> #ifdef DEBUG_DISAS
> - if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
> + if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)
> + && qemu_log_in_addr_range(pc_start)) {
> qemu_log("\n");
> log_target_disas(cs, pc_start, dc->pc - pc_start, 0);
> qemu_log("\nisize=%d osize=%d\n",
> diff --git a/target-m68k/translate.c b/target-m68k/translate.c
> index f90187f..83db42a 100644
> --- a/target-m68k/translate.c
> +++ b/target-m68k/translate.c
> @@ -3067,7 +3067,8 @@ void gen_intermediate_code(CPUM68KState *env, TranslationBlock *tb)
> gen_tb_end(tb, num_insns);
>
> #ifdef DEBUG_DISAS
> - if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
> + if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)
> + && qemu_log_in_addr_range(pc_start)) {
> qemu_log("----------------\n");
> qemu_log("IN: %s\n", lookup_symbol(pc_start));
> log_target_disas(cs, pc_start, dc->pc - pc_start, 0);
> diff --git a/target-microblaze/translate.c b/target-microblaze/translate.c
> index 513f390..c54304a 100644
> --- a/target-microblaze/translate.c
> +++ b/target-microblaze/translate.c
> @@ -1818,7 +1818,8 @@ void gen_intermediate_code(CPUMBState *env, struct TranslationBlock *tb)
>
> #ifdef DEBUG_DISAS
> #if !SIM_COMPAT
> - if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
> + if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)
> + && qemu_log_in_addr_range(pc_start)) {
> qemu_log("\n");
> #if DISAS_GNU
> log_target_disas(cs, pc_start, dc->pc - pc_start, 0);
> diff --git a/target-mips/translate.c b/target-mips/translate.c
> index 3bd96aa..f420680 100644
> --- a/target-mips/translate.c
> +++ b/target-mips/translate.c
> @@ -19913,7 +19913,8 @@ done_generating:
>
> #ifdef DEBUG_DISAS
> LOG_DISAS("\n");
> - if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
> + if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)
> + && qemu_log_in_addr_range(pc_start)) {
> qemu_log("IN: %s\n", lookup_symbol(pc_start));
> log_target_disas(cs, pc_start, ctx.pc - pc_start, 0);
> qemu_log("\n");
> diff --git a/target-openrisc/translate.c b/target-openrisc/translate.c
> index d4f1f26..c08876b 100644
> --- a/target-openrisc/translate.c
> +++ b/target-openrisc/translate.c
> @@ -1751,7 +1751,8 @@ void gen_intermediate_code(CPUOpenRISCState *env, struct TranslationBlock *tb)
> tb->icount = num_insns;
>
> #ifdef DEBUG_DISAS
> - if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
> + if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)
> + && qemu_log_in_addr_range(pc_start)) {
> qemu_log("\n");
> log_target_disas(cs, pc_start, dc->pc - pc_start, 0);
> qemu_log("\nisize=%d osize=%d\n",
> diff --git a/target-ppc/translate.c b/target-ppc/translate.c
> index fe10bf8..123e42f 100644
> --- a/target-ppc/translate.c
> +++ b/target-ppc/translate.c
> @@ -11642,7 +11642,8 @@ void gen_intermediate_code(CPUPPCState *env, struct TranslationBlock *tb)
> tb->icount = num_insns;
>
> #if defined(DEBUG_DISAS)
> - if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
> + if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)
> + && qemu_log_in_addr_range(pc_start)) {
> int flags;
> flags = env->bfd_mach;
> flags |= ctx.le_mode << 16;
> diff --git a/target-s390x/translate.c b/target-s390x/translate.c
> index 2bbd102..ce5db5d 100644
> --- a/target-s390x/translate.c
> +++ b/target-s390x/translate.c
> @@ -5429,7 +5429,8 @@ void gen_intermediate_code(CPUS390XState *env, struct TranslationBlock *tb)
> tb->icount = num_insns;
>
> #if defined(S390X_DEBUG_DISAS)
> - if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
> + if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)
> + && qemu_log_in_addr_range(pc_start)) {
> qemu_log("IN: %s\n", lookup_symbol(pc_start));
> log_target_disas(cs, pc_start, dc.pc - pc_start, 1);
> qemu_log("\n");
> diff --git a/target-sh4/translate.c b/target-sh4/translate.c
> index ff5222b..7518eb5 100644
> --- a/target-sh4/translate.c
> +++ b/target-sh4/translate.c
> @@ -1924,7 +1924,8 @@ void gen_intermediate_code(CPUSH4State * env, struct TranslationBlock *tb)
> tb->icount = num_insns;
>
> #ifdef DEBUG_DISAS
> - if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
> + if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)
> + && qemu_log_in_addr_range(pc_start)) {
> qemu_log("IN:\n"); /* , lookup_symbol(pc_start)); */
> log_target_disas(cs, pc_start, ctx.pc - pc_start, 0);
> qemu_log("\n");
> diff --git a/target-sparc/translate.c b/target-sparc/translate.c
> index 21760b9..afd306f 100644
> --- a/target-sparc/translate.c
> +++ b/target-sparc/translate.c
> @@ -5330,7 +5330,8 @@ void gen_intermediate_code(CPUSPARCState * env, TranslationBlock * tb)
> tb->icount = num_insns;
>
> #ifdef DEBUG_DISAS
> - if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
> + if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)
> + && qemu_log_in_addr_range(pc_start)) {
> qemu_log("--------------\n");
> qemu_log("IN: %s\n", lookup_symbol(pc_start));
> log_target_disas(cs, pc_start, last_pc + 4 - pc_start, 0);
> diff --git a/target-tricore/translate.c b/target-tricore/translate.c
> index 83fa4fc..eb3deac 100644
> --- a/target-tricore/translate.c
> +++ b/target-tricore/translate.c
> @@ -8787,7 +8787,8 @@ void gen_intermediate_code(CPUTriCoreState *env, struct TranslationBlock *tb)
> }
>
> #ifdef DEBUG_DISAS
> - if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
> + if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)
> + && qemu_log_in_addr_range(pc_start)) {
> qemu_log("IN: %s\n", lookup_symbol(pc_start));
> log_target_disas(cs, pc_start, ctx.pc - pc_start, 0);
> qemu_log("\n");
> diff --git a/target-unicore32/translate.c b/target-unicore32/translate.c
> index b04d22c..c4d45fa 100644
> --- a/target-unicore32/translate.c
> +++ b/target-unicore32/translate.c
> @@ -2021,7 +2021,8 @@ done_generating:
> gen_tb_end(tb, num_insns);
>
> #ifdef DEBUG_DISAS
> - if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
> + if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)
> + && qemu_log_in_addr_range(pc_start)) {
> qemu_log("----------------\n");
> qemu_log("IN: %s\n", lookup_symbol(pc_start));
> log_target_disas(cs, pc_start, dc->pc - pc_start, 0);
> diff --git a/target-xtensa/translate.c b/target-xtensa/translate.c
> index 67efb32..2a8e5c5 100644
> --- a/target-xtensa/translate.c
> +++ b/target-xtensa/translate.c
> @@ -3153,7 +3153,8 @@ void gen_intermediate_code(CPUXtensaState *env, TranslationBlock *tb)
> gen_tb_end(tb, insn_count);
>
> #ifdef DEBUG_DISAS
> - if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
> + if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)
> + && qemu_log_in_addr_range(pc_start)) {
> qemu_log("----------------\n");
> qemu_log("IN: %s\n", lookup_symbol(pc_start));
> log_target_disas(cs, pc_start, dc.pc - pc_start, 0);
--
Alex Bennée
prev parent reply other threads:[~2016-06-05 9:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-03 23:03 [Qemu-devel] [PATCH] target-*: dfilter support for in_asm Richard Henderson
2016-06-05 9:05 ` Alex Bennée [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8737os3t08.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.