qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC 03/28] target-xtensa: implement disas_xtensa_insn


From: Richard Henderson
Subject: Re: [Qemu-devel] [RFC 03/28] target-xtensa: implement disas_xtensa_insn
Date: Wed, 04 May 2011 08:39:35 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Thunderbird/3.1.10

On 05/03/2011 05:59 PM, Max Filippov wrote:
> +static void gen_jump(DisasContext *dc, TCGv dest)
> +{
> +    tcg_gen_mov_i32(cpu_pc, dest);
> +    if (dc->singlestep_enabled) {
> +        gen_exception(EXCP_DEBUG);
> +    }
> +    tcg_gen_exit_tb(0);
> +    dc->is_jmp = DISAS_UPDATE;

You're generating useless instructions here.  The exception
is a noreturn function.  It performs a longjmp to back out
of the cpu loop.

Thus the exit_tb should be in an else here.

> +invalid_opcode:
> +    printf("INVALID(pc = %08x): %s:%d\n", dc->pc, __FILE__, __LINE__);

Don't printf.  Use the logging functions properly.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]