[PATCH 00/10] Add support for GCC's __builtin_unreachable() and use it in BUG.
Benjamin Herrenschmidt
benh at kernel.crashing.org
Thu Sep 24 13:37:13 EST 2009
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 <benh at kernel.crashing.org>
More information about the Linuxppc-dev
mailing list