This is the mail archive of the
mailing list for the GCC project.
Re: basic asm and memory clobbers
- From: <Paul_Koning at Dell dot com>
- To: <law at redhat dot com>
- Cc: <segher at kernel dot crashing dot org>, <dw at LimeGreenSocks dot com>, <gcc at gcc dot gnu dot org>, <rth at gcc dot gnu dot org>, <pinskia at gcc dot gnu dot org>, <sandra at codesourcery dot com>
- Date: Fri, 20 Nov 2015 22:07:15 +0000
- 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> <564F7C33 dot 2090101 at redhat dot com>
> On Nov 20, 2015, at 3:01 PM, Jeff Law <firstname.lastname@example.org> wrote:
> 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.
Yes. I know I've run into cases before where certain documented properties were not honored. I can't find the details right now; I think it was "old style asm always behaves as if marked 'volatile'. "