basic asm and memory clobbers - Proposed solution
Paul_Koning@Dell.com
Paul_Koning@Dell.com
Tue Dec 15 20:42:00 GMT 2015
> On Dec 15, 2015, at 7:52 AM, Bernd Schmidt <bschmidt@redhat.com> wrote:
>
> On 12/14/2015 09:10 AM, Segher Boessenkool wrote:
>> That, and adding a memory clobber degrades performance for a lot of
>> existing basic asm that does not expect the clobber, e.g. asm(""),
>> asm("#"), asm("nop"), ...
>
> I wonder about this. People keep bringing up "a lot of existing basic asm" in general, but are there any known examples in real software?
In the codebase for the product I work on, I see about 200 of them. Many of those are the likes of asm("sync") for MIPS, which definitely wants to be treated as if it were asm ("sync" : : : "memory").
That's not counting the hundreds I see in gdb/stubs -- those are "outside a function" flavor.
paul
More information about the Gcc
mailing list