On 10/25/2015 09:41 PM, David Wohlferd wrote:
Does gcc's inline asm support multi-alternative constraints? Or are
they only supported for md?
The fact that it is doc'ed with the other constraints
(https://gcc.gnu.org/onlinedocs/gcc/Constraints.html) says it works for
inline. But https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10396#c17 says
it only works for md.
I've got a patch ready to remove this section from the non-md docs
(attached). But there probably needs to be more support than a 11 year
old comment to approve it.
Dropping a supported feature is always controversial. But if it doesn't
work, perhaps less so. After all, doc'ing something that doesn't work
is just as bad.
dw
PS If it *is* supported, then the docs need some work.
I think Richard corrected me last I spoke on this topic :-) They *are*
supported. ie, something like this should work on a ciscy target.
asm("add %0,%1" : "=r,m"(x) : "rim,ri"(y))