qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 09/10] target-avr: updating translate.c to use i


From: Michael Rolnik
Subject: Re: [Qemu-devel] [PATCH 09/10] target-avr: updating translate.c to use instructions translation
Date: Mon, 6 Jun 2016 00:49:05 +0300

get_opcode no longer present.

I use it for the sake of skip instruction. I do not know a priori the
length of the next instruction as it can be either 16 or 32 bits.

On Sun, Jun 5, 2016 at 6:33 AM, Richard Henderson <address@hidden> wrote:

> On 06/02/2016 01:07 PM, Michael Rolnik wrote:
>
>> +uint32_t    get_opcode(
>> +                                    uint8_t const      *code,
>> +                                    unsigned            bitBase,
>> +                                    unsigned            bitSize)
>> +{
>> +    return  *(uint16_t *)code;
>> +}
>>
>
> Unused.  And what was this supposed to do?
>
> +        /*  decode next instruction */
>> +        ctx.inst[1].cpc = ctx.inst[0].npc;
>> +        decode_opc(cpu, &ctx, &ctx.inst[1]);
>>
>
> Why are you decoding one instruction ahead?
>
> While I can see that this might be keen for some of the skip-next
> instructions, I don't see that you're using that just now.  So perhaps
> delay this until it's actually used?
>
>
> r~
>



-- 
Best Regards,
Michael Rolnik


reply via email to

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