This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Deprecating GCC extensions...


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]