Invalid Operands with Inline assembly

David Korn dkorn@pixelpower.com
Thu Oct 26 04:46:00 GMT 2000


>I am attempting to embed inline assembly into my C code but during the
>compilation, I keep getting the error "invalid operands for opcode". 
>Here is one of my lines:
>
>asm("mov %r14, %r15");

  I've found (on PPC; it might apply to SH also) that you can't put a
space between the two operands. gas expects the entire operand list to
be in one field, the space acts as a separator, and it parses what you've
typed as

    mov %r14,

followed by a comment field that contains the text "%r15". So try again
without the space. What that other guy said about %-signs might matter too.

    DaveK
-- 
SEAL Team 6 World Trade Center Serbian Cocaine [Hello to all my fans
in domestic surveillance] cracking KGB nuclear arrangements CIA
counter-intelligence smuggle fissionable ammunition SDI

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com



More information about the crossgcc mailing list