mirror of
https://github.com/boostorg/atomic.git
synced 2026-02-02 20:32:09 +00:00
Clang failed to compile such code. Given that gcc 7 also complained about missing displacements in memory operands, this trick is no longer effective with newer compilers. Instead, the assembler code have been refactored to avoid having to specify any displacements at all, offloading this work to the compiler. We hope that the compiler will be smart enough to not overallocate registers for every memory operand used in the inline assembler. At least, recent gcc and clang are able to do this and generate code comparable to what was achieved previously. Additionally, it was possible to reduce assembler code in several places by removing mov instructions setting up input registers or handling the results. Instead, we now rely on the compiler doing this work to satisfy assembler block constraints. In 32-bit load and store, improved support for targets with SSE but not SSE2. It is possible to use SSE to do the loads/stores. Also, the scratch xmm register is now picked by the compiler.