Messages in this thread | | | Date | Wed, 18 May 2016 19:22:58 +0200 | From | Peter Zijlstra <> | Subject | Re: [RFC PATCH 00/15] Provide atomics and bitops implemented with ISO C++11 atomics |
| |
On Wed, May 18, 2016 at 04:10:37PM +0100, David Howells wrote: > There are some advantages to using ISO C++11 atomics: > > (1) The compiler can make use of extra information, such as condition > flags, that are tricky to get out of inline assembly in an efficient > manner. This should reduce the number of instructions required in > some cases - such as in x86 where we use SETcc to store the condition > inside the inline asm and then CMP outside to put it back again. > > Whilst this can be alleviated by the use of asm-goto constructs, this > adds mandatory conditional jumps where the use of CMOVcc and SETcc > might be better.
Supposedly gcc-6.1 has cc-output which makes this go away.
| |