ReadNoFence64 is broken on i386 MSVC <11.0 and Clang MSVC mode, and has never been used inside Wine for PE side.
-- v2: include: Remove ReadNoFence64 and related definitions if defined(_MSC_VER). include: Compile out ReadNoFence64 if defined(_MSC_VER) && !defined(__WINESRC__).
From: Jinoh Kang jinoh.kang.kr@gmail.com
ReadNoFence64 is broken on i386 MSVC <11.0 and Clang MSVC mode, and has never been used inside Wine for PE side.
Fixes: f82b1c1fcf770a5d6fa02c3f286282be79a201b8 --- include/winnt.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/include/winnt.h b/include/winnt.h index 2547f841b7c..aced6b555f4 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -7120,11 +7120,13 @@ static FORCEINLINE LONG ReadNoFence( LONG const volatile *src ) return value; }
+#ifndef __WINESRC__ static FORCEINLINE LONG64 ReadNoFence64( LONG64 const volatile *src ) { LONG64 value = __WINE_LOAD64_NO_FENCE( (__int64 const volatile *)src ); return value; } +#endif
static FORCEINLINE void WriteRelease( LONG volatile *dest, LONG value ) {
From: Jinoh Kang jinoh.kang.kr@gmail.com
ReadNoFence64 is broken on i386 MSVC <11.0 and Clang MSVC mode. Hopefully no one outside Wine has ever used this (partially) broken function.
Fixes: f82b1c1fcf770a5d6fa02c3f286282be79a201b8 --- include/winnt.h | 11 ----------- 1 file changed, 11 deletions(-)
diff --git a/include/winnt.h b/include/winnt.h index aced6b555f4..8f1d0360231 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -7079,14 +7079,11 @@ static FORCEINLINE void MemoryBarrier(void) */ #if _MSC_VER >= 1700 #pragma intrinsic(__iso_volatile_load32) -#pragma intrinsic(__iso_volatile_load64) #pragma intrinsic(__iso_volatile_store32) #define __WINE_LOAD32_NO_FENCE(src) (__iso_volatile_load32(src)) -#define __WINE_LOAD64_NO_FENCE(src) (__iso_volatile_load64(src)) #define __WINE_STORE32_NO_FENCE(dest, value) (__iso_volatile_store32(dest, value)) #else /* _MSC_VER >= 1700 */ #define __WINE_LOAD32_NO_FENCE(src) (*(src)) -#define __WINE_LOAD64_NO_FENCE(src) (*(src)) #define __WINE_STORE32_NO_FENCE(dest, value) ((void)(*(dest) = (value))) #endif /* _MSC_VER >= 1700 */
@@ -7120,14 +7117,6 @@ static FORCEINLINE LONG ReadNoFence( LONG const volatile *src ) return value; }
-#ifndef __WINESRC__ -static FORCEINLINE LONG64 ReadNoFence64( LONG64 const volatile *src ) -{ - LONG64 value = __WINE_LOAD64_NO_FENCE( (__int64 const volatile *)src ); - return value; -} -#endif - static FORCEINLINE void WriteRelease( LONG volatile *dest, LONG value ) { __wine_memory_barrier_acq_rel();
MSVC <11.0 case has been fixed by !7237.
In light of possibility of having patches that accesa the user shared memory from PE side, we probably should keep the built-in as-is.
The upstram clang bug is: https://github.com/llvm/llvm-project/issues/126516. Note that, AFAIK, we don't support old clang (yet).