Boost logo

Boost :

Subject: Re: [boost] [atomic] Availability detection
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2010-01-31 08:13:12

On 01/31/2010 03:22 PM, Helge Bahmann wrote:
> (you mean cmpxchg8b probably)


> Because the compiler cannot always know if you
> might intend to run the code on a 486 unless you explicitly tell it?
> FWIW if you pass -march=i686 to gcc then the compiler will unconditionally
> generate code that cannot run on 486 (cmov& friends), Boost.Atomic will
> detect that case as well and also unconditionally generate cmpxchg8b. If you
> do *not* pass this flag, the decision whether to use cmpxchg8b can only be
> made at runtime.

Ok, this behavior is fine with me. Thanks, and looking forward for your
library in Boost!

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