This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add memory barriers to xbegin/xend/xabort


"H.J. Lu" <hjl.tools@gmail.com> writes:

> On Wed, Oct 29, 2014 at 11:07 PM, Andi Kleen <ak@linux.intel.com> wrote:
>>>
>>> Hmm, can't the insns themselves properly clobber/use memory?
>>
>> The transactions don't really use the memory. They just guard it,
>> like a lock.
>>
>> So the intrinsic doesn't know what memory is used inside the transaction,
>> but the accesses still cannot be moved out.
>>
>> I think a barrier is the only sensible option.
>>
>>> I suppose they are UNSPEC_VOLATILE anyway, right?
>>
>> That doesn't have any barrier semantics by itself, does it?
>>
>
> Do you have a testcase to show it makes a difference?

It fixed customer code. I currently don't have a separate
test case.

-Andi
-- 
ak@linux.intel.com -- Speaking for myself only


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]