From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52442) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afTH3-0005j5-DI for qemu-devel@nongnu.org; Mon, 14 Mar 2016 10:15:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afTGx-0004QE-RD for qemu-devel@nongnu.org; Mon, 14 Mar 2016 10:15:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34112) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afTGx-0004Pz-MC for qemu-devel@nongnu.org; Mon, 14 Mar 2016 10:15:03 -0400 References: <87r3fjpvgx.fsf@fimbulvetr.bsc.es> <56E046D3.2080709@twiddle.net> <56E6AD2B.7060304@greensocs.com> From: Paolo Bonzini Message-ID: <56E6C763.7020306@redhat.com> Date: Mon, 14 Mar 2016 15:14:59 +0100 MIME-Version: 1.0 In-Reply-To: <56E6AD2B.7060304@greensocs.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC] [tcg] Idea on refactoring target code generation loop (gen_intermediate_code) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: KONRAD Frederic , Richard Henderson , qemu-devel@nongnu.org Cc: Peter Crosthwaite On 14/03/2016 13:23, KONRAD Frederic wrote: >> These "target-specific hooks" probably ought not be "hooks" in the >> traditional sense of attaching them to CPUState. I'd be more >> comfortable with a refactoring that used include files -- maybe .h or >> maybe .inc.c. If we do the normal sort of hook, then we've got to >> either expose DisasContext in places we shouldn't, or dynamically >> allocate it. Neither seems particularly appealing. > > On the other side I think attaching them to CPUState would make > heterogenous system emulation easier? It depends on whether they're going to be called from generic code. As long as they are only called from other CPU-specific bits, adding them to CPUState isn't necessary. Paolo