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


Martynas Kunigelis wrote:

> While experimenting I tried using commas at the end of each line, like
> this:
>
> asm (
>   "movl %0,%1",
>   "decl %2",
>   "int $0x80"
>   : /* this is just an example */
>   : "=r" (0) /* whatever */
> );
>
>

This is how I would have written it:
asm ("
  movl %0,%1;
  decl %2;
  int $0x80;"
  : /* this is just an example */
  : "=r" (0) /* whatever */
);

--
Gilles-Claude Rajaobelina \\\///    | mailto:Gilles.Rajaobelina@bull.net |
Groupe Bull               (o  o)    | http://www.openmaster.com \\\///   |
rue Jean Jaures, BP68  oOO--(_)--OOo| Tel:(33)01.30.80.77.87    (o  o)   |
78340 Les Clayes sous Bois, FRANCE  |Fax:(33)01.30.80.33.35 oOO--(_)--OOo|




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