[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [PATCH 2/4] target-lm32: disable asm logging via LOG_
From: |
Peter Maydell |
Subject: |
Re: [Qemu-trivial] [PATCH 2/4] target-lm32: disable asm logging via LOG_DIS() |
Date: |
Thu, 13 Oct 2016 11:36:47 +0100 |
On 12 October 2016 at 23:35, Michael Walle <address@hidden> wrote:
> The lm32 target already has a disassembler which logs the assembly
> instructions with "-d in_asm". Therefore, turn of the LOG_DIS() macro to
> prevent logging the assembly instructions twice. Also turn the macro in a
> one which is always compiled to catch any errors while the macro is turned
> off.
>
> Signed-off-by: Michael Walle <address@hidden>
> ---
> target-lm32/translate.c | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/target-lm32/translate.c b/target-lm32/translate.c
> index fa8416a..792637f 100644
> --- a/target-lm32/translate.c
> +++ b/target-lm32/translate.c
> @@ -33,12 +33,14 @@
> #include "exec/log.h"
>
>
> -#define DISAS_LM32 1
> -#if DISAS_LM32
> -# define LOG_DIS(...) qemu_log_mask(CPU_LOG_TB_IN_ASM, ## __VA_ARGS__)
> -#else
> -# define LOG_DIS(...) do { } while (0)
> -#endif
> +#define DISAS_LM32 0
> +
> +#define LOG_DIS(...) \
> + do { \
> + if (DISAS_LM32) { \
> + qemu_log_mask(CPU_LOG_TB_IN_ASM, ## __VA_ARGS__); \
> + } \
> + } while (0)
>
> #define EXTRACT_FIELD(src, start, end) \
> (((src) >> start) & ((1 << (end - start + 1)) - 1))
> --
> 2.1.4
Reviewed-by: Peter Maydell <address@hidden>
thanks
-- PMM
- [Qemu-trivial] [PATCH 1/4] target-lm32: swap operand of wcsr in LOG_DIS(), Michael Walle, 2016/10/12
- [Qemu-trivial] [PATCH 2/4] target-lm32: disable asm logging via LOG_DIS(), Michael Walle, 2016/10/12
- Re: [Qemu-trivial] [PATCH 2/4] target-lm32: disable asm logging via LOG_DIS(),
Peter Maydell <=
- [Qemu-trivial] [PATCH 3/4] lm32: milkymist-tmu2: fix integer overflow, Michael Walle, 2016/10/12
- [Qemu-trivial] [PATCH 4/4] target-lm32: rewrite gen_compare(), Michael Walle, 2016/10/12
- Re: [Qemu-trivial] [PATCH 1/4] target-lm32: swap operand of wcsr in LOG_DIS(), Peter Maydell, 2016/10/13
- Re: [Qemu-trivial] [PATCH 1/4] target-lm32: swap operand of wcsr in LOG_DIS(), Michael Tokarev, 2016/10/15