qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 3/3] target/tricore: Use translate_loop


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 3/3] target/tricore: Use translate_loop
Date: Mon, 17 Jun 2019 09:51:05 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0

On 6/17/19 7:35 AM, Bastian Koppelmann wrote:
> +static void tricore_tr_translate_insn(DisasContextBase *dcbase, CPUState 
> *cpu)
> +{
> +    DisasContext *ctx = container_of(dcbase, DisasContext, base);
> +    CPUTriCoreState *env = cpu->env_ptr;
> +
> +    ctx->opcode = cpu_ldl_code(env, ctx->base.pc_next);
> +    decode_opc(ctx);

I'll note that there's an existing bug here, always reading 4 bytes with ldl.
You need to load 2 bytes, look at the low bit as in decode_opc.  If 16-bit,
read nothing more; if 32-bit, read 2 more bytes.


r~



reply via email to

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