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

David Howells (dhowells@redhat.com)
Tue, 23 Oct 2001 13:04:27 +0100


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