Re: [PATCH 01/10] Add support for GCC-4.5's __builtin_unreachable() to compiler.h

2009-09-14 Thread David Daney
Geert Uytterhoeven wrote: On Fri, Sep 11, 2009 at 17:58, David Daneydda...@caviumnetworks.com wrote: Michael Buesch wrote: On Friday 11 September 2009 01:56:42 David Daney wrote: +/* Unreachable code */ +#ifndef unreachable +# define unreachable() do { for (;;) ; } while (0) +#endif # define

Re: [PATCH 01/10] Add support for GCC-4.5's __builtin_unreachable() to compiler.h

2009-09-12 Thread Geert Uytterhoeven
On Fri, Sep 11, 2009 at 17:58, David Daneydda...@caviumnetworks.com wrote: Michael Buesch wrote: On Friday 11 September 2009 01:56:42 David Daney wrote: +/* Unreachable code */ +#ifndef unreachable +# define unreachable() do { for (;;) ; } while (0) +#endif # define unreachable() do { }

Re: [PATCH 01/10] Add support for GCC-4.5's __builtin_unreachable() to compiler.h

2009-09-11 Thread Michael Buesch
On Friday 11 September 2009 01:56:42 David Daney wrote: +/* Unreachable code */ +#ifndef unreachable +# define unreachable() do { for (;;) ; } while (0) +#endif # define unreachable() do { } while (1) ? :) -- Greetings, Michael. ___ Linuxppc-dev

Re: [PATCH 01/10] Add support for GCC-4.5's __builtin_unreachable() to compiler.h

2009-09-11 Thread David Daney
Michael Buesch wrote: On Friday 11 September 2009 01:56:42 David Daney wrote: +/* Unreachable code */ +#ifndef unreachable +# define unreachable() do { for (;;) ; } while (0) +#endif # define unreachable() do { } while (1) ? :) Clearly I was not thinking clearly when I wrote that part.

[PATCH 01/10] Add support for GCC-4.5's __builtin_unreachable() to compiler.h

2009-09-10 Thread David Daney
Starting with version 4.5, GCC has a new built-in function __builtin_unreachable() that can be used in places like the kernel's BUG() where inline assembly is used to transfer control flow. This eliminated the need for an endless loop in these places. The patch adds a new macro 'unreachable()'

Re: [PATCH 01/10] Add support for GCC-4.5's __builtin_unreachable() to compiler.h

2009-09-10 Thread Richard Henderson
On 09/10/2009 04:56 PM, David Daney wrote: +#ifndef unreachable +# define unreachable() do { for (;;) ; } while (0) +#endif #define unreachable() do { } while (1) r~ ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org