[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] tcg: Fix complilation with TCG
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] tcg: Fix complilation with TCG |
Date: |
Fri, 24 Nov 2017 11:09:58 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
On 24/11/2017 11:07, Peter Maydell wrote:
> On 23 November 2017 at 22:08, Paolo Bonzini <address@hidden> wrote:
>> On 22/11/2017 13:14, Peter Maydell wrote:
>>>> We do this all of the time for more regular tests that are obviously
>>>> compile-time. I am a really big fan of this, because it makes sure that
>>>> the
>>>> (usually 32-bit) else branch continues to compile.
>>> I'm happy with code that is "we assume the compiler is going to
>>> be sensible here so we don't have to use #ifdefs in the name
>>> of performance". I just don't think we should write code that
>>> can't compile at all if the compiler happens to not identify
>>> the codepath as dead. There's no guarantee by the compiler
>>> that it's going to do that.
>> There's plenty of cases where "if (kvm_enabled())" code would fail to
>> link if the compiler didn't do that optimization.
>
> I think that's a step less weird than "assert(kvm_enabled())",
> but I tend to think of that kind of thing as "if the compiler
> ever did decide not to link it we'd add missing stub functions".
I'll take a look at moving all the notdirty_* stuff under #ifdef
CONFIG_TCG then, for now we can proceed with Juan's patch.
Thanks,
Paolo
Re: [Qemu-devel] [PATCH] tcg: Fix complilation with TCG, Peter Maydell, 2017/11/22
Re: [Qemu-devel] [PATCH] tcg: Fix complilation with TCG, Philippe Mathieu-Daudé, 2017/11/22
Re: [Qemu-devel] [PATCH] tcg: Fix complilation with TCG, no-reply, 2017/11/22
Re: [Qemu-devel] [PATCH] tcg: Fix complilation with TCG, Peter Maydell, 2017/11/23