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: "\n\t" in inline asm


On Thu, Dec 10, 1998 at 12:08:48PM +0100, Philip Blundell wrote:
> >I use inline assembly quite often and I am a little disturbed by the
> >need to append "\n\t" to the end of every inline assembly line. This
> 
> You don't.  You can write it like this:
> 
> asm (
>   "movl %0,%1
>    decl %2
>    int $0x80"
>   : /* this is just an example */
>   : "=r" (0) /* whatever */
> );


But then the assembly output is ugly.  The point of using "\n\t" is that
it matches up with GCC's generated code in the output file.

I like the suggestion for parsing commas between strings as line
separators.  Semicolons instead of commas might be easier (they work for
`for'), but they're a bit uglier IMO and easily confused with colons.

-- Jamie


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