lkml.org 
[lkml]   [2002]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] BUG preserve registers
    Linus Torvalds wrote:

    >
    > On Sat, 9 Feb 2002, Andrew Morton wrote:
    >
    >>Is better, except the filename gets expanded multipe times into
    >>the object file. How about:
    >>
    >>#define BUG() \
    >> asm( "ud2\n" \
    >> "\t.word %0\n" \
    >> "\t.long %1\n" \
    >> : : "i" (__LINE__), "i" (__FILE__))
    >>
    >
    > Even better.
    >
    > That way you can actually totally remove the "verbose bug" config option,
    > because even the verbose BUG's aren't actually using up any noticeable
    > amounts of space.
    >
    > This is all assuming that gcc doesn't create the string for inline
    > functions that aren't used, which it probably cannot, so maybe this
    > doesn't work out.
    >


    Since gcc wouldn't even *see* a macro it didn't use, I find it hard to
    imagine it would create anything.

    However, you really want to do "asm volatile" rather than "asm"...

    -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: 2005-03-22 13:24    [W:2.585 / U:0.964 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site