From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqYiv-0008AL-06 for qemu-devel@nongnu.org; Tue, 10 Dec 2013 20:36:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VqYim-0000Fj-JT for qemu-devel@nongnu.org; Tue, 10 Dec 2013 20:36:24 -0500 Received: from mail-pb0-x230.google.com ([2607:f8b0:400e:c01::230]:61694) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqYim-0000Fc-CB for qemu-devel@nongnu.org; Tue, 10 Dec 2013 20:36:16 -0500 Received: by mail-pb0-f48.google.com with SMTP id md12so8872571pbc.7 for ; Tue, 10 Dec 2013 17:36:15 -0800 (PST) Sender: Richard Henderson Message-ID: <52A7C18A.8080400@twiddle.net> Date: Tue, 10 Dec 2013 17:36:10 -0800 From: Richard Henderson MIME-Version: 1.0 References: <1385580849-10777-1-git-send-email-ehabkost@redhat.com> <1385580849-10777-2-git-send-email-ehabkost@redhat.com> <20131210185506.GF27737@otherpad.lan.raisama.net> In-Reply-To: <20131210185506.GF27737@otherpad.lan.raisama.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/7 v2] target-i386: Eliminate CONFIG_KVM #ifdefs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost , qemu-devel@nongnu.org, =?ISO-8859-1?Q?Andreas_F=E4rber?= Cc: Igor Mammedov , Jiri Denemark , Paolo Bonzini On 12/10/2013 10:55 AM, Eduardo Habkost wrote: > The compiler is capable of eliminating the KVM-specific function calls > as long as the calling function has an assert(kvm_enabled()) line, so we > don't need to wrap all KVM-specific code inside #ifdefs. Really? In tcg/tcg.h we force NDEBUG if not CONFIG_TCG_DEBUG, which makes assert expand to nothing. This statement may be true for some files, but almost everything under target-i386 includes tcg.h. Although I know we've talked within glibc and gcc the de-optimization of missing out on assert info, and how we ought to use __builtin_gcc_unreachable in order to retain that, we've still not done anything official with . That said, I don't disagree with the changes, if they work with a forced -DNDEBUG, i.e. unreachable code that still compiles. r~