lkml.org 
[lkml]   [2009]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86: remove unneeded endless loop in BUG()
Petr Tesarik wrote:
> Since __builtin_trap() will always generate an illegal instruction, we
> can replace the explicit asm("ud2") with it.
>
> This way gcc will understand that the function never returns, plus it
> won't emit any extra instructions.
>
> Signed-off-by: Petr Tesarik <ptesarik@suse.cz>

I like this. Will apply shortly.

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.



\
 
 \ /
  Last update: 2009-02-19 19:47    [W:0.055 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site