PATCH: Fix 20000724-1.c
Mark Mitchell
mark@codesourcery.com
Mon Apr 30 11:28:00 GMT 2001
>>>>> "Richard" == Richard Henderson <rth@redhat.com> writes:
>> But, yes, I agree with your analysis. So, we need to notice
>> the clobber of the memory, and not combine across that?
Richard> No, as it would be legal to just read the memory rather
Richard> than modify it.
Sorry, I don't understand. Can you expand on this?
>> Or, I see that Jakub refers to a patch from Jan that does
>> something different, in that it puts the combinations in
>> conservative locations?
Richard> I do seem to remember something like that. But I thought
Richard> it had already gone in. Jan, am I mistaken?
>> Might something else might later move them around again?
Richard> The only other thing would be the scheduler, but volatile
Richard> asms are scheduling barriers.
Richard> Worse come to worse, it might make sense to not do stack
Richard> comhining across volatile asms either.
Yeah, I was going to do that at first. But that seems like it would
penalize some perfectly ordinary code, and there's nothing in the
description of a volatile asm that seems to promise this.
And why not a non-volatile asm? A non-volatile asm that has a memory
clobber could have the exact same effect; it's just that the compiler
is given more freedom to eliminate/move the asm.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
More information about the Gcc-patches
mailing list