From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754629Ab1A1KOj (ORCPT ); Fri, 28 Jan 2011 05:14:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:2117 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754244Ab1A1KOi (ORCPT ); Fri, 28 Jan 2011 05:14:38 -0500 From: Andreas Schwab To: "David Laight" Cc: "David Daney" , "Coly Li" , Wang Cong , Jeremy Fitzhardinge , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Yong Zhang Subject: Re: [PATCH 2/7] PowerPC: add unlikely() to BUG_ON() References: <4D41B213.4070606@caviumnetworks.com> X-Yow: Clear the laundromat!! This whirl-o-matic just had a nuclear meltdown!! Date: Fri, 28 Jan 2011 11:14:16 +0100 In-Reply-To: (David Laight's message of "Fri, 28 Jan 2011 09:05:59 -0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "David Laight" writes: > Also, as (I think) in some of the generated code quoted, > use of __builtin_expect() with a boolean expression can > force some versions of gcc to generate the integer > value of the expression That's more likely a side effect of the definition of likely/unlikely: they expand to !!(x). Andreas. -- Andreas Schwab, schwab@redhat.com GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E "And now for something completely different."