https://git.reactos.org/?p=reactos.git;a=commitdiff;h=32f17b34f57f65ef9bf9e…
commit 32f17b34f57f65ef9bf9eb989c6ffaa67c836e5f
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Sat Aug 15 21:39:34 2020 +0200
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Sun Aug 23 12:07:38 2020 +0200
[KERNEL32_APITEST] Enable SSE for TestSSEExceptions. CORE-17202
Clang will not let us use SSE intrinsics at all when compiling for a
target that doesn't support SSE. Since this test is a special case,
we can simply fix this by changing the options for one function.
The alternative would be to use our own inline functions for the
intrinsics instead of the builtins, like we do for GCC.
---
modules/rostests/apitests/kernel32/SetUnhandledExceptionFilter.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/modules/rostests/apitests/kernel32/SetUnhandledExceptionFilter.c b/modules/rostests/apitests/kernel32/SetUnhandledExceptionFilter.c
index e59d5e1e7d1..f3a8b1c1a85 100644
--- a/modules/rostests/apitests/kernel32/SetUnhandledExceptionFilter.c
+++ b/modules/rostests/apitests/kernel32/SetUnhandledExceptionFilter.c
@@ -102,6 +102,9 @@ static LONG WINAPI ExceptionFilterSSEException(LPEXCEPTION_POINTERS exp)
return EXCEPTION_CONTINUE_EXECUTION;
}
+#ifdef __clang__
+__attribute__((__target__("sse")))
+#endif
static
VOID TestSSEExceptions(VOID)
{
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a81788e5bfb95e2db2281…
commit a81788e5bfb95e2db22812c268f35a6de59b793f
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Sat Aug 15 21:41:32 2020 +0200
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Sun Aug 23 12:07:37 2020 +0200
[CMAKE] Explicitly target Pentium for clang. CORE-17202
The MSVC-compatible /arch:IA32 option switches to i386 mode, which
makes clang avoid 486/Pentium-specific instructions, e.g. cmpxchg8b.
---
sdk/cmake/msvc.cmake | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/sdk/cmake/msvc.cmake b/sdk/cmake/msvc.cmake
index 0039d71e9de..94847a84167 100644
--- a/sdk/cmake/msvc.cmake
+++ b/sdk/cmake/msvc.cmake
@@ -51,7 +51,12 @@ endif()
# HACK: for VS 11+ we need to explicitly disable SSE, which is off by
# default for older compilers. See CORE-6507
if(ARCH STREQUAL "i386")
- add_compile_flags("/arch:IA32")
+ # Clang's IA32 means i386, which doesn't have cmpxchg8b
+ if(USE_CLANG_CL)
+ add_compile_flags("-march=${OARCH}")
+ else()
+ add_compile_flags("/arch:IA32")
+ endif()
endif()
# VS 12+ requires /FS when used in parallel compilations
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=08550a504e6d9d85714ba…
commit 08550a504e6d9d85714ba8d02b5114e60318c930
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Sat Aug 15 21:42:26 2020 +0200
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Sun Aug 23 12:07:37 2020 +0200
[CRT] Make some more intrinsics conditional. CORE-17202
---
sdk/include/crt/mingw32/intrin_x86.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/sdk/include/crt/mingw32/intrin_x86.h b/sdk/include/crt/mingw32/intrin_x86.h
index 25f58316701..424bbc61d06 100644
--- a/sdk/include/crt/mingw32/intrin_x86.h
+++ b/sdk/include/crt/mingw32/intrin_x86.h
@@ -686,12 +686,14 @@ __INTRIN_INLINE long _InterlockedAddLargeStatistic(volatile long long * Addend,
}
#endif /* __i386__ */
+#if !HAS_BUILTIN(_interlockedbittestandreset)
__INTRIN_INLINE unsigned char _interlockedbittestandreset(volatile long * a, long b)
{
unsigned char retval;
__asm__("lock; btrl %[b], %[a]; setb %b[retval]" : [retval] "=q" (retval), [a] "+m" (*a) : [b] "Ir" (b) : "memory");
return retval;
}
+#endif
#if defined(__x86_64__)
__INTRIN_INLINE unsigned char _interlockedbittestandreset64(volatile long long * a, long long b)
@@ -1008,6 +1010,7 @@ __INTRIN_INLINE unsigned char _BitScanReverse(unsigned long * Index, unsigned lo
}
#endif
+#if !HAS_BUILTIN(_bittest)
/* NOTE: again, the bizarre implementation follows Visual C++ */
__INTRIN_INLINE unsigned char _bittest(const long * a, long b)
{
@@ -1020,6 +1023,7 @@ __INTRIN_INLINE unsigned char _bittest(const long * a, long b)
return retval;
}
+#endif
#ifdef __x86_64__
__INTRIN_INLINE unsigned char _BitScanForward64(unsigned long * Index, unsigned long long Mask)
@@ -1051,6 +1055,7 @@ __INTRIN_INLINE unsigned char _bittest64(const long long * a, long long b)
}
#endif
+#if !HAS_BUILTIN(_bittestandcomplement)
__INTRIN_INLINE unsigned char _bittestandcomplement(long * a, long b)
{
unsigned char retval;
@@ -1062,7 +1067,9 @@ __INTRIN_INLINE unsigned char _bittestandcomplement(long * a, long b)
return retval;
}
+#endif
+#if !HAS_BUILTIN(_bittestandreset)
__INTRIN_INLINE unsigned char _bittestandreset(long * a, long b)
{
unsigned char retval;
@@ -1074,7 +1081,9 @@ __INTRIN_INLINE unsigned char _bittestandreset(long * a, long b)
return retval;
}
+#endif
+#if !HAS_BUILTIN(_bittestandset)
__INTRIN_INLINE unsigned char _bittestandset(long * a, long b)
{
unsigned char retval;
@@ -1086,6 +1095,7 @@ __INTRIN_INLINE unsigned char _bittestandset(long * a, long b)
return retval;
}
+#endif
#ifdef __x86_64__
@@ -1321,15 +1331,19 @@ __INTRIN_INLINE unsigned long long __cdecl _byteswap_uint64(unsigned long long v
}
#endif
+#if !HAS_BUILTIN(__lzcnt)
__INTRIN_INLINE unsigned int __lzcnt(unsigned int value)
{
return __builtin_clz(value);
}
+#endif
+#if !HAS_BUILTIN(__lzcnt16)
__INTRIN_INLINE unsigned short __lzcnt16(unsigned short value)
{
return __builtin_clz(value);
}
+#endif
#if !HAS_BUILTIN(__popcnt)
__INTRIN_INLINE unsigned int __popcnt(unsigned int value)
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f363c27ab483da5530120…
commit f363c27ab483da5530120aa53b96aa744b5a99f9
Author: Joachim Henze <Joachim.Henze(a)reactos.org>
AuthorDate: Sun Aug 23 00:35:02 2020 +0200
Commit: Joachim Henze <Joachim.Henze(a)reactos.org>
CommitDate: Sun Aug 23 00:35:02 2020 +0200
[SHELL32] Demote 2 noisy goodpath loggings to TRACE CORE-17216
Those 2 did spam heavily when browsing folders with
many .zip files within. Mark Jansen confirmed that
this is good-path-logging and was just forgotten
to be disabled earlier.
---
dll/win32/shell32/folders/CFSFolder.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dll/win32/shell32/folders/CFSFolder.cpp b/dll/win32/shell32/folders/CFSFolder.cpp
index 9aa8281daa4..6adaba0d47c 100644
--- a/dll/win32/shell32/folders/CFSFolder.cpp
+++ b/dll/win32/shell32/folders/CFSFolder.cpp
@@ -645,14 +645,14 @@ HRESULT SHELL32_GetFSItemAttributes(IShellFolder * psf, LPCITEMIDLIST pidl, LPDW
Status = SHRegGetValueW(hkey, NULL, L"Attributes", RRF_RT_REG_DWORD, NULL, &dwAttributes, &dwSize);
if (Status == STATUS_SUCCESS)
{
- ERR("Augmenting '%S' with dwAttributes=0x%x\n", szFileName, dwAttributes);
+ TRACE("Augmenting '%S' with dwAttributes=0x%x\n", szFileName, dwAttributes);
dwShellAttributes |= dwAttributes;
}
::RegCloseKey(hkey);
// This should be presented as directory!
bDirectory = TRUE;
- ERR("Treating '%S' as directory!\n", szFileName);
+ TRACE("Treating '%S' as directory!\n", szFileName);
}
}
}