Hi, All !

I have found an error in the inline assembler documentation (Chapter 6.1).

If we define an inline assembler code, that takes variable foo 
as input and output we should write:

    asm("add %[bar],%[foo]"
        : [foo] "=r" (foo)
        : "[foo]" (foo), [bar] "m" (bar));

or 

    asm("add %1,%0"
        : "=r" (foo)
        : "0" (foo),  "m" (bar));

instead of     

   asm("add %[bar],%[foo]"
        : [foo] "=r" (foo)
        : [foo] "r" (foo), [bar] "m" (bar));

as written in the docs.

My msp-gcc does not compile the code from the docs. Here is it's output:

s.c:8: duplicate asm operand name 'foo'

BTW, are there any possibility to download the whole documentation 
as single file or archive ?

All the best !
Oleg


Reply via email to