From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40982) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkDAn-0000qq-Sv for qemu-devel@nongnu.org; Tue, 13 May 2014 09:55:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkDAe-0004TA-8M for qemu-devel@nongnu.org; Tue, 13 May 2014 09:55:13 -0400 Received: from mail-qa0-x233.google.com ([2607:f8b0:400d:c00::233]:43840) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkDAe-0004SJ-4e for qemu-devel@nongnu.org; Tue, 13 May 2014 09:55:04 -0400 Received: by mail-qa0-f51.google.com with SMTP id w8so373524qac.10 for ; Tue, 13 May 2014 06:55:03 -0700 (PDT) Sender: Richard Henderson Message-ID: <53722433.3060803@twiddle.net> Date: Tue, 13 May 2014 06:54:59 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1399938424-6703-1-git-send-email-rth@twiddle.net> <1399938424-6703-9-git-send-email-rth@twiddle.net> <87y4y66msq.fsf@linaro.org> In-Reply-To: <87y4y66msq.fsf@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 08/10] tcg: Save flags and computed sizemask in TCGHelperInfo List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QWxleCBCZW5uw6ll?= Cc: qemu-devel@nongnu.org, aurelien@aurel32.net 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~