Inline asm (x86): How to use offsettable addresses?

Ian Lance Taylor iant@google.com
Sat Apr 30 10:48:00 GMT 2011


Frank Heckenbach <f.heckenbach@fh-soft.de> writes:

>> Let me put it this way, then; the 'o' constraint is designed for gcc
>> internal use.  It is not designed for the use to which you want to put
>> it.  What you are looking for is reasonable, but the 'o' constraint does
>> not provide it.
>
> OK, I see. I'd suggest then to reword the documentation, or perhaps
> remove "o" constraint completely from the inline asm section to
> avoid misleading users. If I hadn't seen it, I might have written my
> code differently from the start when it would have been easier than
> changing it now.

Yeah, the docs are problematic and I'm not entirely happy with them.  We
used to document the constraints for compiler developers but not for
inline asm users.  That made life hard for inline asm users, so we
adjusted the docs so that we currently produce the same docs for
compiler developers and for inline asm users.  Unfortunately, as you
have discovered, that can be misleading for inline asm users in some
cases.

Ian



More information about the Gcc-help mailing list