This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: inline asm string/line break rules change
- From: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- To: Andi Kleen <ak at suse dot de>,Joel Sherrill <joel at OARcorp dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Sat, 13 Apr 2002 23:03:04 +0200
- Subject: Re: inline asm string/line break rules change
- References: <3CB88687.85AA58CB@OARcorp.com.suse.lists.egcs> <p737knbbdkm.fsf@oldwotan.suse.de>
On Saturday 13 April 2002 21:31, Andi Kleen wrote:
> Joel Sherrill <joel@OARcorp.com> writes:
> > If there was a discussion on this, I must not have missed
> > it or not realized the potential impact. I sure don't want
> > to begin to modify other code bases until I know the intention.
>
> It's also a big problem for the linux kernel and for various other
> packages.
kernel is fixed for a long time and there are only a few packages out there
using inline assembly heavily.
> Even if there should be good reasons to discourage multi line string
> I think it shouldn't be warned until an alternative inline assembly
> syntax that doesn't rely on strings exists. Currently it is discouraging
> one practice with no good replacement.
Please? A warning is there since gcc-3.0! And adding the 3 chars \n\ to each
multiline isn't that hard, with Joel's example:
asm volatile(" movw %%ds,%0
movw %, %%es"
: "=r" (tmp_segment) :
: "0" (tmp_segment) );
would turn into
asm volatile(" movw %%ds,%0 \n\
movw %, %%es"
: "=r" (tmp_segment) :
: "0" (tmp_segment) );
Seems easy enough to me (did it to the ppc assmbly in glibc for example).
Franz.