[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] x86: fix variable_test_bit() asmconstraints



>>> Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx> 14.03.08 14:59 >>>
>Jan Beulich, le Fri 14 Mar 2008 13:51:26 +0000, a Ãcrit :
>> >memory-clobber would be needed for the atomic ops, but a dummy memory
>> >operand would suffice for non-atomic ops. I used memory clobber everywhere
>> 
>> Atomic ops imply a barrier (otherwise the compiler can defeat the
>> purpose of the atomic operation). The non-atomic ones don't need a
>> dummy operand, but one that precisely describes the place in memory
>> that changes.
>
>Mmm, won't that unnecessarily make the compiler put code to compute that
>place?

Indeed, trying it out makes it obvious that the fake operand has too
much of a side effect when the bit offset isn't constant. So I guess
Keir's intention of just using a memory clobber here is the best we can
get without severely complicating the source.

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.