This is the mail archive of the
mailing list for the GCC project.
Re: inline asm and multi-alternative constraints
- From: Jeff Law <law at redhat dot com>
- To: David Wohlferd <dw at LimeGreenSocks dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Cc: pinskia at gcc dot gnu dot org, rearnsha at gcc dot gnu dot org, Sandra Loosemore <sandra at codesourcery dot com>
- Date: Tue, 27 Oct 2015 15:05:34 -0600
- Subject: Re: inline asm and multi-alternative constraints
- Authentication-results: sourceware.org; auth=none
- References: <562DA0E2 dot 1040405 at LimeGreenSocks dot com>
On 10/25/2015 09:41 PM, David Wohlferd wrote:
I think Richard corrected me last I spoke on this topic :-) They *are*
supported. ie, something like this should work on a ciscy target.
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.
PS If it *is* supported, then the docs need some work.
asm("add %0,%1" : "=r,m"(x) : "rim,ri"(y))