qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/7 v2] target-i386: Eliminate CONFIG_KVM #ifdef


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 1/7 v2] target-i386: Eliminate CONFIG_KVM #ifdefs
Date: Tue, 10 Dec 2013 17:36:10 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

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 <assert.h>.

That said, I don't disagree with the changes, if they work with a forced
-DNDEBUG, i.e. unreachable code that still compiles.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]