This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


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

RE: Invalid Operands with Inline assembly


>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


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