bit fields && data tearing
H. Peter Anvin
hpa at zytor.com
Tue Sep 9 13:20:49 EST 2014
On 09/08/2014 07:56 PM, James Bottomley wrote:
>>
>> Yeah, the extra requirement I added is basically nonsense, since the
>> only issue is what instructions the compiler is emitting. So if compiler
>> thinks the alignment is natural and combines the writes -- ok. If the
>> compiler thinks the alignment is off and doesn't combine the writes --
>> also ok.
>
> Yes, I think I can agree that the only real problem is gcc thinking the
> store or load needs splitting.
>
That seems much saner, and yes, that applies to any architecture which
needs unaligned references. Now, if the references are *actually*
unaligned they can end up being split even on x86, especially if they
cross cache line boundaries.
-hpa
More information about the Linuxppc-dev
mailing list