This is the mail archive of the
mailing list for the GCC project.
Re: basic asm and memory clobbers - Proposed solution
- From: David Wohlferd <dw at LimeGreenSocks dot com>
- To: Andrew Haley <aph at redhat dot com>, Paul_Koning at Dell dot com, bernd dot edlinger at hotmail dot de
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 1 Dec 2015 14:29:53 -0800
- Subject: Re: basic asm and memory clobbers - Proposed solution
- Authentication-results: sourceware.org; auth=none
- References: <56552209 dot 1020306 at LimeGreenSocks dot com> <56592801 dot 9010606 at LimeGreenSocks dot com> <HE1PR07MB09050E30BB6C251DBB454790E4020 at HE1PR07MB0905 dot eurprd07 dot prod dot outlook dot com> <9EAD225F-1323-439F-B697-C90F86F1D959 at dell dot com> <565B8FE2 dot 7000500 at LimeGreenSocks dot com> <565C3AAE dot 2080705 at redhat dot com>
On 11/30/2015 4:01 AM, Andrew Haley wrote:
>> There is a way for people to be clear about what they want to clobber,
>> and that's to use extended asm. The way to clear up the ambiguity
>> start deprecating basic asm, not to add to the confusion by changing
>> behavior after all these years.
> Well, I disagree. The warning is good, but so is the memory clobber.
> They're not exclusive.
As Richard Henderson put it: "I'd be perfectly happy to deprecate and
later completely remove basic asm within functions."
So my intent is that today's optional warning becomes tomorrow's default
warning which eventually turns into a fatal error. We could speed that
up a bit by making it a default warning now and a fatal error as soon as
we re-enter phase 1. I just thought it might be better to update the
docs now and delay the change to give more of a heads up.
Yes, we could pursue both clobbering and completely removing at the same
time, but I don't think we should. Since (currently) basic asm always
has no clobbers describing how to update basic asm to extended is fairly
simple: To get the same behavior in extended as you used to get from
basic, just add a colon. If some versions of gcc perform clobbers, then
knowing how to convert gets way harder.