Boost logo

Boost :

Subject: [boost] [atomic] unconditional cmpxchg8b support
From: Tim Blechmann (tim_at_[hidden])
Date: 2012-10-23 05:40:07

hi helge & list,

using boost.atomic on ia32/gcc causes me quite some headaches these
days, as the cmpxchg8b instruction is enabled via the __i686__ or
__x86_64__ macros.
however on debian for example, the compiler defaults to generate code
for i486. cmpxchg8b has been introduced with the p5 architecture,
though, so compiling without specifying a -march flag won't generate the

whatever, i wonder if it would be reasonable to enable cmpxchg8b by
default on *all* ia32 platforms, not just on i686. advantage: less
trouble, as we can be sure that the instruction is generated.
boost.lockfree e.g. is not lockfree on ia32 without. disadvantage: the
code won't work on i386 and i486 machines.

imo, all ia32 machines without cmpxchg8b should belong to a museum, and
we could introduce a macro like BOOST_ATOMIC_NO_CMPXCHG8B if we really
care of compiling for any of those machines.



Boost list run by bdawes at, gregod at, cpdaniel at, john at