[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 08/10] tcg: Save flags and computed sizemask in
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 08/10] tcg: Save flags and computed sizemask in TCGHelperInfo |
Date: |
Tue, 13 May 2014 06:54:59 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
On 05/13/2014 02:38 AM, Alex Bennée wrote:
>> + info = g_hash_table_lookup(s->helpers, (gpointer)func);
>> > + assert(info != NULL);
>> > + assert(info->sizemask == sizemask);
> I assume g_assert vs assert is purely cosmetic? QEMU seems inconsistent
> at best about this :-/
Yes indeed. It doesn't help that g_assert is stupid and doesn't evaluate its
argument when assertions are disabled, so that you can get unused variable
warnings.
The best sort of assert is as we do for tcg_debug_assert, where we invoke
__builtin_unreachable when not aborting, which gives the compiler optimization
info about the expression.
I'm not sure how best to clean all this up in qemu, but I'm pretty sure that
more use of glib isn't it.
r~
- Re: [Qemu-devel] [PATCH 03/10] tcg: Push tcg-runtime routines into exec/helper-*, (continued)
- [Qemu-devel] [PATCH 05/10] tcg: Inline tcg_gen_helperN, Richard Henderson, 2014/05/12
- [Qemu-devel] [PATCH 06/10] tcg: Move side effects out of dh_sizemask, Richard Henderson, 2014/05/12
- [Qemu-devel] [PATCH 04/10] tcg: Use helper-gen.h in tcg-op.h, Richard Henderson, 2014/05/12
- [Qemu-devel] [PATCH 08/10] tcg: Save flags and computed sizemask in TCGHelperInfo, Richard Henderson, 2014/05/12
- [Qemu-devel] [PATCH 07/10] tcg: Register the helper info struct rather than the name, Richard Henderson, 2014/05/12
- [Qemu-devel] [PATCH 09/10] tcg: Remove sizemask and flags arguments to tcg_gen_callN, Richard Henderson, 2014/05/12
- [Qemu-devel] [PATCH 10/10] tcg: Move size effects out of dh_arg, Richard Henderson, 2014/05/12