From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K11FI-0002BO-Nd for qemu-devel@nongnu.org; Tue, 27 May 2008 11:37:52 -0400 Received: from [199.232.76.173] (port=42744 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K11FI-0002BA-8o for qemu-devel@nongnu.org; Tue, 27 May 2008 11:37:52 -0400 Received: from mx1.polytechnique.org ([129.104.30.34]:38685) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K11FI-0001av-4z for qemu-devel@nongnu.org; Tue, 27 May 2008 11:37:52 -0400 Received: from fbe1.dev.netgem.com (gw.netgem.com [195.68.2.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ssl.polytechnique.org (Postfix) with ESMTP id 579A23316C for ; Tue, 27 May 2008 17:37:47 +0200 (CEST) Message-ID: <483C2AC6.6090301@bellard.org> Date: Tue, 27 May 2008 17:37:42 +0200 From: Fabrice Bellard MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 1/6] simplify cpu_exec References: <1211901505-30519-1-git-send-email-gcosta@redhat.com> <1211901505-30519-2-git-send-email-gcosta@redhat.com> In-Reply-To: <1211901505-30519-2-git-send-email-gcosta@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Glauber Costa wrote: > This is a first attempt to simplify cpu_exec(): it has simply > too many ifdefs, which is not a very good practice at all. > > Following some work I've already posted in the past, I'm moving the target-b > ifdefs to target-xxx/helper.c, encapsuled into relevant functions. OK for that, except that the naming is confusing because the related functions may not deal with the "flags". cpu_env_to_exec() and cpu_exec_to_env() might be better. Moreover, using inline functions (in exec.h) should be better. Fabrice.