Skip to content

include: Prefer builtin atomics on x86 unless known broken.

William Horvath requested to merge whrvt/wine:atomic-builtins into master

Clang presents as GCC 4.2.1, so it was always using the fallbacks for InterlockedExchange{,Pointer} on the non-PE side.

The fix for the GCC __atomic_* bug linked in the comment for the __WINE_ATOMIC_* macros first appeared in GCC 8: https://github.com/gcc-mirror/gcc/commit/d8c40eff56f69877b33c697ded756d50fde90c27

Note that prior to this patch, ReadNoFence64 is broken on i386. As a side effect, this MR fixes that by using the compiler builtin for __WINE_ATOMIC_, given that GCC>=8 or Clang is used. See !7237 (merged) for a targeted fix for the non-compiler-builtin path.

Edited by William Horvath

Merge request reports

Loading