This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Deprecating GCC extensions...
- To: Fergus Henderson <fjh at cs dot mu dot oz dot au>
- Subject: Re: Deprecating GCC extensions...
- From: Andi Kleen <ak at suse dot de>
- Date: Mon, 5 Mar 2001 17:04:30 +0100
- Cc: Andi Kleen <ak at suse dot de>, gcc at gcc dot gnu dot org
- References: <20010228232827.A12658@daikokuya.demon.co.uk> <20010301145100.A22921@hg.cs.mu.oz.au> <oupn1b0tek8.fsf@pigdrop.muc.suse.de> <20010306024915.A6481@hg.cs.mu.oz.au>
On Tue, Mar 06, 2001 at 02:49:15AM +1100, Fergus Henderson wrote:
> On 05-Mar-2001, Andi Kleen <ak@suse.de> wrote:
> > Compare:
> >
> > asm("movl x,y\n\t"
> > "movl y,z\n\t"
> > "cmpl bla,blub\n\t")
> >
> >
> > to
> >
> > asm("movl x,y
> > movl y,z
> > cmpl bla,blub");
>
> Another alternative is
>
> asm("movl x,y \n\
> movl y,z \n\
> cmpl bla,blub");
I definitely prefer the multi line string approach. \<end-of-line> is in my
experience hard to edit because there always sneaks in a white space after the \
somewhere when you edit a big block of them, giving strange syntax errors.
BTW, there would be lots of other possible extensions that would make writing
gcc inline assembler more easy (like named arguments [no more % counting!] or
a way to write input/output expressions inline)
-Andi