From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59899) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9Ool-0007R9-9M for qemu-devel@nongnu.org; Sat, 04 Jun 2016 23:33:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b9Oof-00011A-7m for qemu-devel@nongnu.org; Sat, 04 Jun 2016 23:33:38 -0400 Received: from mail-pa0-x229.google.com ([2607:f8b0:400e:c03::229]:35920) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9Oof-00010I-18 for qemu-devel@nongnu.org; Sat, 04 Jun 2016 23:33:33 -0400 Received: by mail-pa0-x229.google.com with SMTP id te7so21855813pab.3 for ; Sat, 04 Jun 2016 20:33:32 -0700 (PDT) Sender: Richard Henderson References: <1464898022-97990-1-git-send-email-rolnik@amazon.com> <1464898022-97990-9-git-send-email-rolnik@amazon.com> From: Richard Henderson Message-ID: <02f74c6c-164d-5fb9-f904-2ba3e4a819b6@twiddle.net> Date: Sat, 4 Jun 2016 20:33:30 -0700 MIME-Version: 1.0 In-Reply-To: <1464898022-97990-9-git-send-email-rolnik@amazon.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 09/10] target-avr: updating translate.c to use instructions translation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Rolnik , qemu-devel@nongnu.org Cc: Michael Rolnik 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~