lkml.org 
[lkml]   [2007]   [Jul]   [25]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 24 Jul 2007 22:09:24 -0700
From"H. Peter Anvin" <>
SubjectRe: [PATCH][RFC] getting rid of stupid loop in BUG()
Keith Owens wrote:
> Trent Piepho (on Tue, 24 Jul 2007 19:31:36 -0700 (PDT)) wrote:
>> Adding __builtin_trap after the
>> asm might be an ok fix.  It will emit a spurious int 6, but that won't even be
>> reached since the asm doesn't return, and it probably be less extra code than
>> the loop.
> 
> int 6 is a two byte instruction, the loop generates jmp with an 8 bit
> offset, also two bytes.  No change in code size.
> 

INT 6 is #UD, so the __builtin_trap() replaces the ud2a as well as the loop.

How far back was __builtin_trap() supported?

	-hpa
-
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/

\
 
 \ /
  Last update: 2007-07-25 07:17    [from the cache]
©2003-2008