Re: [PATCH] gcc 3.0.1 warnings about multi-line literals

From: David Howells (dhowells@redhat.com)
Date: Tue Oct 23 2001 - 07:04:27 EST


"David S. Miller" <davem@redhat.com> wrote:
> /* try atomic lock inline, if that fails, spin out of line */
> "\tbtsl $1,%0\n"
>
> It's only gross because you decided to make it so, try:
>
> "btsl $1,%0\n\t"

You can also do things like:

        " btsl $1,%0 \n"
        " bne 2f \n"
        "1: \n"
        " .section .text.lock \n"
        " \n"
        "2: cmpl $0,%0 \n"
        " bne 2b \n"
        " rep ; nop \n"
        " jmpl 1b \n"
        " \n"
        " .section .previous \n"

using tabs or spaces to pad out the assembly.

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



This archive was generated by hypermail 2b29 : Tue Oct 23 2001 - 21:00:37 EST