Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.5, 10.6
-
IA-32, AMD64, GCC, clang (and derivatives such as Xcode, icc), Microsoft C compiler
Description
This is actually a compiler bug. The Intel 80386 processor introduced some bit operations that would be the perfect translation for atomic single-bit read-modify-and-write operations. Alas, even the latest compilers as of today (GCC, clang, Microsoft C compiler) would generate a loop around LOCK CMPXCHG instead of emitting the instructions LOCK BTS (fetch_or()), LOCK BTR (fetch_and()), LOCK BTC (fetch_xor()).
We have several single-bit fetch_and() and fetch_or() operations that can be optimized to LOCK BTS or LOCK BTR, similar to (this fix of MDEV-26467).
Attachments
Issue Links
- causes
-
MDEV-27402 Error "'asm goto' constructs are not supported yet" on macOS with Xcode 9.4.1
- Closed
- relates to
-
MDEV-27667 Fix MDEV-26720 on 64-bit Microsoft Windows
- Closed
-
MDEV-26467 Unnecessary compare-and-swap loop in futex-based synchronization
- Closed