[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
- [Qemu-devel] [PATCH 08/10] target-avr: adding instruction translation, (continued)
- [Qemu-devel] [PATCH 08/10] target-avr: adding instruction translation, Michael Rolnik, 2016/06/02
- [Qemu-devel] [PATCH 01/10] target-avr: AVR cores support is added. 1. basic CPU structure 2. registers 3. no instructions, Michael Rolnik, 2016/06/02
- [Qemu-devel] [PATCH 02/10] target-avr: adding AVR CPU features/flavors, Michael Rolnik, 2016/06/02
- [Qemu-devel] [PATCH 06/10] target-avr: adding helpers for IN, OUT, SLEEP, WBR & unsupported instructions, Michael Rolnik, 2016/06/02
- Re: [Qemu-devel] [PATCH 06/10] target-avr: adding helpers for IN, OUT, SLEEP, WBR & unsupported instructions, Richard Henderson, 2016/06/04
- Re: [Qemu-devel] [PATCH 06/10] target-avr: adding helpers for IN, OUT, SLEEP, WBR & unsupported instructions, Michael Rolnik, 2016/06/05
- [Qemu-devel] [PATCH 03/10] target-avr: adding a sample AVR board, Michael Rolnik, 2016/06/02
- [Qemu-devel] [PATCH 09/10] target-avr: updating translate.c to use instructions translation, Michael Rolnik, 2016/06/02
- [Qemu-devel] [PATCH 10/10] target-avr: fixing code style, Michael Rolnik, 2016/06/02
- Re: [Qemu-devel] [PATCH 10/10] target-avr: fixing code style, Peter Maydell, 2016/06/02
- Re: [Qemu-devel] [PATCH 10/10] target-avr: fixing code style, Richard Henderson, 2016/06/04
- Re: [Qemu-devel] [PATCH 10/10] target-avr: fixing code style, Michael Rolnik, 2016/06/04
- Re: [Qemu-devel] [PATCH 10/10] target-avr: fixing code style, Richard Henderson, 2016/06/04
- Re: [Qemu-devel] [PATCH 10/10] target-avr: fixing code style, Peter Maydell, 2016/06/05
- Re: [Qemu-devel] [PATCH 10/10] target-avr: fixing code style, Richard Henderson, 2016/06/04
[Qemu-devel] [PATCH 07/10] target-avr: adding instruction decoder, Michael Rolnik, 2016/06/02