mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-20 15:51:07 +01:00
apply issue/#13952 fix to SDL_cpuinfo.h, too.
This commit is contained in:
@@ -39,21 +39,19 @@
|
|||||||
/* Need to do this here because intrin.h has C++ code in it */
|
/* Need to do this here because intrin.h has C++ code in it */
|
||||||
/* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
|
/* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
|
||||||
#if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64))
|
#if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64))
|
||||||
#ifdef __clang__
|
|
||||||
/* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
|
/* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
|
||||||
so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
|
so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
|
||||||
|
#if defined(__clang__) && !_SDL_HAS_BUILTIN(_m_prefetch)
|
||||||
#ifndef __PRFCHWINTRIN_H
|
#ifndef __PRFCHWINTRIN_H
|
||||||
#define __PRFCHWINTRIN_H
|
#define __PRFCHWINTRIN_H
|
||||||
|
|
||||||
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||||
_m_prefetch(void *__P)
|
_m_prefetch(void *__P)
|
||||||
{
|
{
|
||||||
__builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);
|
__builtin_prefetch(__P, 0, 3 /* _MM_HINT_T0 */);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* __PRFCHWINTRIN_H */
|
#endif /* __PRFCHWINTRIN_H */
|
||||||
#endif /* __clang__ */
|
#endif /* __clang__ */
|
||||||
|
|
||||||
#include <intrin.h>
|
#include <intrin.h>
|
||||||
#ifndef _WIN64
|
#ifndef _WIN64
|
||||||
#ifndef __MMX__
|
#ifndef __MMX__
|
||||||
|
|||||||
Reference in New Issue
Block a user