On Thu, Mar 8, 2012 at 12:44 AM, Kirill Yukhin <kirill.yuk...@gmail.com> wrote: > Hi HJ, > I am working on that. Here's some clarification from Jakub: >> I meant that e.g. instead of: >> int >> foo (int *p, int oldv, int newv) >> { >> __atomic_compare_exchange_n (p, &oldv, newv, 0, __ATOMIC_ACQUIRE, >> __ATOMIC_ACQUIRE); >> return oldv; >> } >> if you want to generate xacquire lock cmpxchgl instead of just lock cmpxchgl >> you could write >> __atomic_compare_exchange_n (p, &oldv, newv, 0, __ATOMIC_ACQUIRE | >> __ATOMIC_HLE_XACQUIRE, __ATOMIC_ACQUIRE); >> (dunno if we'd want the flag to be listed in both success and fail memmodel >> variants, or just one, for most of other __atomic_* builtins there is just >> one). >> __ATOMIC_HLE_XACQUIRE and __ATOMIC_HLE_XRELEASE would be just predefined >> macros like __ATOMIC_ACQUIRE etc. is. >> >> Jakub > > I don't think, we need to change FE for that...
Please note that __ATOMIC_HLE_XACQUIRE has nothing to do with __ATOMIC_ACQUIRE. You can have __ATOMIC_ACQUIRE | __ATOMIC_HLE_XRELEASE > K > >> >> That sounds a good idea. Will it require front-end and middle-end changes? >> I assume they will be no-op for other backends. >> >> -- >> H.J. -- H.J.