From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33957) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bN1L5-00049R-Oa for qemu-devel@nongnu.org; Tue, 12 Jul 2016 13:19:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bN1L1-0007z4-I6 for qemu-devel@nongnu.org; Tue, 12 Jul 2016 13:19:18 -0400 Received: from mail-qt0-x244.google.com ([2607:f8b0:400d:c0d::244]:36054) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bN1L1-0007yz-E1 for qemu-devel@nongnu.org; Tue, 12 Jul 2016 13:19:15 -0400 Received: by mail-qt0-x244.google.com with SMTP id u25so782911qtb.3 for ; Tue, 12 Jul 2016 10:19:15 -0700 (PDT) Sender: Richard Henderson References: <1467844395-28900-1-git-send-email-mrolnik@gmail.com> <1467844395-28900-2-git-send-email-mrolnik@gmail.com> From: Richard Henderson Message-ID: <0b836a17-cec3-73fb-f2e8-a825de0e106f@twiddle.net> Date: Tue, 12 Jul 2016 10:19:11 -0700 MIME-Version: 1.0 In-Reply-To: <1467844395-28900-2-git-send-email-mrolnik@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v10 01/10] target-avr: AVR cores support is added. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Rolnik , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org On 07/06/2016 03:33 PM, Michael Rolnik wrote: > +static bool avr_cpu_has_work(CPUState *cs) > +{ > + AVRCPU *cpu = AVR_CPU(cs); > + CPUAVRState *env = &cpu->env; > + > + return (cs->interrupt_request > + & (CPU_INTERRUPT_HARD > + | CPU_INTERRUPT_RESET)) > + && cpu_interrupts_enabled(env); > +} > +static void avr_cpu_synchronize_from_tb(CPUState *cs, TranslationBlock *tb) > +{ > + AVRCPU *cpu = AVR_CPU(cs); > + CPUAVRState *env = &cpu->env; > + > + env->pc_w = tb->pc / 2; /* internally PC points to words */ > +} For the 4th time: missing spaces between functions. Lots of them. Please fix them all, without me having to repeat myself a 5th time. > + bool fullacc;/* CPU/MEM if true MEM only otherwise */ ... > +static inline void cpu_get_tb_cpu_state(CPUAVRState *env, target_ulong *pc, > + target_ulong *cs_base, uint32_t *pflags) > +{ > + *pc = env->pc_w * 2; > + *cs_base = 0; > + *pflags = 0; > +} The fullacc bit needs to be reflected in *pflags here. The way you are accessing env->fullacc from translate*.c is invalid. r~