"... on older GCC versions"
Yes, and I understand that this suggestion neither *necessary* **nor** *sufficient* to fix the fact that it's currently broken on any GCC/Clang version. I didn't mean to imply this would obviate the need for the FILD/FISTP fix, I only meant that it might be clearer to primarily use the builtins (which are fixed in any relevant GCC/Clang version), and only use this as a fallback. You could simply have a macro like e.g. `BROKEN_ATOMIC_BUILTINS`, and check for `defined(__i386__) && defined(BROKEN_ATOMIC_BUILTINS)` instead of just `defined(__i386__)` here.
This can of course can be done after this MR is accepted, which I'm willing to do.