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: [i386, patch, RFC] HLE support in GCC


On Tue, Apr 10, 2012 at 7:12 AM, Kirill Yukhin <kirill.yukhin@gmail.com> wrote:
>>
>> Yeah. ?And you don't need to change the FEs in any way, all that is needed
>> is to change the middle-end/expansion (builtins.c - e.g. get_memmodel)
>> and the backend (plus predefine the macros in the backend).
>>
>> ? ? ? ?Jakub
>
> Hi Jakub,
> Attached patch implements HLE support for __atomic_compare_exchange_n.
>
> So, to emit HLE prefix, it is possible to do:
> int
> foo2 (int *p, int oldv, int newv)
> {
> ?__atomic_compare_exchange_n (p, &oldv, newv, 0, __ATOMIC_ACQUIRE |
> __ATOMIC_USE_HLE, __ATOMIC_ACQUIRE);
> ?return oldv;
> }

This is wrong since HLE ACQUIRE/RELEASE has nothing to do with
C++ atomic acquire/release. You can have HLE RELEASE with C++
atomic acquire.


-- 
H.J.


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