This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: basic asm and memory clobbers
- From: Jeff Law <law at redhat dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>, David Wohlferd <dw at LimeGreenSocks dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, rth at gcc dot gnu dot org, pinskia at gcc dot gnu dot org, Sandra Loosemore <sandra at codesourcery dot com>
- Date: Fri, 20 Nov 2015 13:01:55 -0700
- Subject: Re: basic asm and memory clobbers
- Authentication-results: sourceware.org; auth=none
- References: <563FE459 dot 3000003 at LimeGreenSocks dot com> <20151109093229 dot GA5260 at gate dot crashing dot org> <56493010 dot 9070707 at LimeGreenSocks dot com> <564A4AA5 dot 1080706 at redhat dot com> <564AC155 dot 4040601 at LimeGreenSocks dot com> <564B9CB1 dot 1060001 at redhat dot com> <564E762B dot 6070705 at LimeGreenSocks dot com> <20151120031431 dot GC29689 at gate dot crashing dot org> <564EF9B1 dot 4000800 at LimeGreenSocks dot com> <20151120145638 dot GA9509 at gate dot crashing dot org>
On 11/20/2015 07:56 AM, Segher Boessenkool wrote:
When basic asm changes, I expect that having a way to "just do what it
used to do" is going to be useful for some people.
24414 says the documented behaviour hasn't been true for at least
fourteen years. It isn't likely anyone is relying on that behaviour.
?
24414 says these things haven't worked since at least 2.95.3, which is
fourteen years old now.
That's not a good reason to leave things as-is.
The problem is that optimizers continue to improve. So an old-style
asm that worked in the past may mysteriously start failing as folks move
forward with their compiler -- because we haven't properly implemented
the right semantics of old-style asms, which is in part because certain
aspects were never documented properly and partly because of reload
issues :(
If we keep old style asms, then we need to properly document what their
behaviour is supposed to be, and continue to fix bugs where we do not
honor that behaviour.
The latter is somewhat painful because we don't have a single place
where we can audit & fix any semantic problems. It's scattered in
various optimizers throughout GCC. And I suspect most are getting it
wrong in one way or another.
Jeff