
23 Oct
2012
23 Oct
'12
11:46 a.m.
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 instruction.
GCC will not let you use instructions outside of the target architecture.
fyi, boost.atomic is using inline assembly