immediate operands without dollar sign for inline asm

Luchezar Belev
Thu Dec 19 17:04:00 GMT 2013

On Mon, Dec 16, 2013 at 10:47 PM, Florian Weimer <> wrote:
> Isn't it specific to a subset of all the architectures?  If it's generic, it
> makes sense to add it to the Extended Asm documentation.

If I am to give opinion, here it is:

I have only used the x86/x64 architecture so far and don't know if it
is architecture specific or generic.
AFAIK the $ sign for immediate operands is for all architectures, so
i'd guess the feature is generic.

This feature is not a constraint modifier and has nothing to do with
the constraints because it is written in the assembly string itself
and not in the constraint descriptor string:
    asm ( "... %0 ..." : "+r" (...) : ); // the '+' here is a
constraint modifier
    asm ( "... %a0 ..." : : "i" (...) ); // the 'a' here is NOT a
constraint modifier
so I would say it's documentation should be located in Extended Asm
(or probably in a new section about "operand modifiers" or whatever
they are called) but not in the constraint section.

Best regards

More information about the Gcc-help mailing list