Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S265853AbTIJVxW (ORCPT ); Wed, 10 Sep 2003 17:53:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S265808AbTIJVxW (ORCPT ); Wed, 10 Sep 2003 17:53:22 -0400 Received: from mail.jlokier.co.uk ([81.29.64.88]:14737 "EHLO mail.jlokier.co.uk") by vger.kernel.org with ESMTP id S265854AbTIJVw5 (ORCPT ); Wed, 10 Sep 2003 17:52:57 -0400 Date: Wed, 10 Sep 2003 22:52:26 +0100 From: Jamie Lokier To: Pavel Machek Cc: "Richard B. Johnson" , Dave Jones , Mitchell Blank Jr , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [PATCH] oops_in_progress is unlikely() Message-ID: <20030910215226.GC24258@mail.jlokier.co.uk> References: <20030907221323.GC28927@redhat.com> <20030910142031.GB2589@elf.ucw.cz> <20030910142308.GL932@redhat.com> <20030910152902.GA2764@elf.ucw.cz> <20030910183138.GA23783@mail.jlokier.co.uk> <20030910201240.GB24424@mail.jlokier.co.uk> <20030910212757.GA257@elf.ucw.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030910212757.GA257@elf.ucw.cz> User-Agent: Mutt/1.4.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 680 Lines: 33 Pavel Machek wrote: > He's right. Even without subsections you can move code somewhere > outside the function. And gcc should be smart enough to do that. It is: extern int a, b; int test() { if (__builtin_expect(a > 1, 1)) foo(); else bar(); return b; } Compiles to (with gcc -Os -fomit-frame-pointer): test: cmpl $1, a jle .L2 call foo .L3: movl b, %eax ret .L2: call bar jmp .L3 Enjoy, -- Jamie - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/