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]
Other format: [Raw text]

Re: Embedded Assembly and MMX in GCC


Yes, I did have the closing double quote - I forgot to type it into the
message......

 If I put two %'s in front of mm0, the assembler returns "bad register name
`%%mm0` "

With the one %, it says "suffix or operands invalid for `movq`"

It seems that on an inline statement, I need to put only 1 % in front of reg
names if there are no input or output variables, and 2 %'s if there are...

Mark


----- Original Message -----
From: "Alexandre Oliva" <aoliva@redhat.com>
To: <mcuss@cdlsystems.com>
Cc: <grahams@redhat.com>; <gcc@gcc.gnu.org>
Sent: Tuesday, December 11, 2001 1:27 PM
Subject: Re: Embedded Assembly and MMX in GCC


> On Dec 11, 2001, "Mark Cuss" <mcuss@cdlsystems.com> wrote:
>
> > __asm__("movq $1, %mm0);
>
> I suppose you're missing a `"' after `%mm0'.
>
> Note that `%' is an active character in inline assembly, mostly like
> printf.  If you want a `%' to get through to the output assembly,
> double it.
>
> --
> Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
> Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
> CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
> Free Software Evangelist    *Please* write to mailing lists, not to me
>



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