From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Herrenschmidt Subject: Re: [PATCH 00/10] Add support for GCC's __builtin_unreachable() and use it in BUG. Date: Thu, 24 Sep 2009 13:37:13 +1000 Message-ID: <1253763433.7103.391.camel@pasglop> References: <4AA991C1.1050800@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4AA991C1.1050800@caviumnetworks.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+glppd-linuxppc64-dev=m.gmane.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+glppd-linuxppc64-dev=m.gmane.org@lists.ozlabs.org To: David Daney Cc: linux-mips@linux-mips.org, Heiko Carstens , linuxppc-dev@ozlabs.org, Paul Mackerras , "H. Peter Anvin" , linux-s390@vger.kernel.org, linux-am33-list@redhat.com, Helge Deller , x86@kernel.org, Ingo Molnar , Mike Frysinger , Ivan Kokshaysky , uclinux-dist-devel@blackfin.uclinux.org, Thomas Gleixner , Richard Henderson , Haavard Skinnemoen , linux-parisc@vger.kernel.org, ralf@linux-mips.org, Kyle McMartin , linux-alpha@vger.kernel.org, Martin Schwidefsky , linux390@de.ibm.com, Andrew Morton , Koichi Yasutake , Linus Torvalds On Thu, 2009-09-10 at 16:54 -0700, David Daney wrote: > Starting with version 4.5, GCC has a new built-in function called > __builtin_unreachable(). The function tells the compiler that control > flow will never reach that point. Currently we trick the compiler by > putting in for(;;); but this has the disadvantage that extra code is > emitted for an endless loop. For an i386 kernel using > __builtin_unreachable() results in an allyesconfig that is nearly 4000 > bytes smaller. For the powerpc part: Acked-by: Benjamin Herrenschmidt