lkml.org 
[lkml]   [2010]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [tip:x86/urgent] x86: Add memory modify constraints to xchg() and cmpxchg()
On 07/28/2010 08:45 AM, Linus Torvalds wrote:
> On Tue, Jul 27, 2010 at 10:33 PM, tip-bot for H. Peter Anvin
> <hpa@zytor.com> wrote:
>>
>> x86: Add memory modify constraints to xchg() and cmpxchg()
>
> Ack. I assume this doesn't really change the code generated? At least
> not with a gcc that honors the whole memory clobber thing properly?
>
> I also suspect that we can/should get rid of the __xg() thing - it was
> there just to make sure gcc didn't see the memory read as a single
> word and tried to optimize it. With the "+m" it probably doesn't
> matter any more (don't know if it ever did)
>

For what it's worth, it fairly heavily preturbs code around
__set_64bit(), which implies it actually does something useful in that
case. The rest of the code looks similar enough.

-hpa



\
 
 \ /
  Last update: 2010-07-29 01:05    [W:0.793 / U:0.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site