This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: inline asm and multi-alternative constraints


On 11/6/2015 4:46 PM, Segher Boessenkool wrote:
On Fri, Nov 06, 2015 at 03:29:43PM -0700, Jeff Law wrote:
It's never easy to predict whether or not something like this will be
contentious.  Worst case is you post, it's contentious, we iterate a bit
and reach some kind of resolution (ok, worst case is no resolution is
reached, but that doesn't happen to often).

In this case I simply don't see a way to sensibly document those
modifiers without bringing in the implementation details of register
class preferencing, reload, IRA & LRA.  And once those details are
brought into the picture, everyone loses.

This very point is what made it clear to me that these flags should be removed. If there is no practical way to describe to the target audience how they work or when to use them, they don't belong here.

I'll take partial credit for asking the questions that highlighted the problem, but Jeff taking the time to respond to them is what got us to the right answer here (thanks Jeff!).

I'm sure there's someone out there using '?' and '!' in a
multi-alternative asm constraint.  They may even read the docs and
complain and we can try to educate them why those modifiers are no
longer documented.
Another reason why we shouldn't document such things is that it makes
it harder to change (anything about) those things later, although they
really are implementation details.

True. In this case, they were already documented and the change was to remove them, something I hesitate to do. But I think what Jeff checked in (thanks Jeff!) gives us the right answer for this page.

The same goes for some constraints and almost all output modifiers.

Are you suggesting more doc changes?  Looking thru the pages you reference:

- Starting with 'modifiers', "=+&" and (reluctantly) "%" seem reasonable for inline asm. But both "#*" seem sketchy.

- Under 'simple constraints', "mringX" all (more or less) make sense to me. But "oV<>sp" are not things I can envision using.

- The 'machine constraints' for i386 (the only machine I know) all seem reasonable. However for platforms that support autoincrement (powerpc?), apparently using "m" needs more docs (per https://gcc.gnu.org/ml/gcc/2008-03/msg01079.html).

Are these the things to which you are referring? I've always assumed the parts that seem obscure here were due to my i386-centric view of the world. Are some of them actually md-only?

There are other minor changes I'd make on some of these pages. But mostly they are not worth it unless I'm doing something else there too. So if there's something here you think needs changing, let me know and I'll take a crack at it.

Other than that, I'll keep working my way thru the doc issues in the inline-asm bugs. I've done what I can for 10396.

dw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]