Boost C++ Libraries: Ticket #8574: Optimization for 64 bit loads and stores for 32 bit x86 on gcc https://svn.boost.org/trac10/ticket/8574 <p> The attached patch contains some fixes and optimizations for 32 bit x86 atomics support for gcc and its pretenders. In particular, the patch contains: </p> <ol><li>Fix for BOOST_ATOMIC_LLONG_LOCK_FREE macro value on 32 bit x86. The macro should have value 2 when cmpxchg8b instruction is enabled in compile time and 0 otherwise (as long as Boost.Atomic doesn't perform run time detection). </li><li>Fixed compile time cmpxchg8b presence check. The previous check only worked on compilers with <span class="underline">sync* intrinsics support or on i686 class CPUs (but not later or i586). </span></li><li>Optimized 64 bit loads and stores in 32 bit x86. When the target/source memory is 8-byte aligned (which is the most common case) it is possible to avoid expensive "lock cmpxchg8b" and use regular loads and stores instead. </li><li>Added a few missing noexcept specifications. </li></ol> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8574 Trac 1.4.3 Andrey Semashev Tue, 14 May 2013 20:29:37 GMT attachment set https://svn.boost.org/trac10/ticket/8574 https://svn.boost.org/trac10/ticket/8574 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">atomic_x86.patch</span> </li> </ul> <p> The patch with fixes and optimizations for 32 bit x86 </p> Ticket Andrey Semashev Tue, 14 May 2013 20:31:29 GMT <link>https://svn.boost.org/trac10/ticket/8574#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8574#comment:1</guid> <description> <p> Note: I tried it locally on Linux with gcc and clang 32 and 64 bit. All tests passed. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>timblechmann</dc:creator> <pubDate>Wed, 15 May 2013 06:12:49 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/8574#comment:2 https://svn.boost.org/trac10/ticket/8574#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/84288" title="atomic: Optimization for 64 bit loads and stores for 32 bit x86 on gcc ...">[84288]</a>) atomic: Optimization for 64 bit loads and stores for 32 bit x86 on gcc </p> <p> fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/8574" title="#8574: Patches: Optimization for 64 bit loads and stores for 32 bit x86 on gcc (closed: fixed)">#8574</a> </p> Ticket