mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-02 01:47:41 +00:00
* Support for intrinsics in MSW + Clang scenario.
Utility polyfill is provided, removed the no-longer-needed conditionals.
This commit is contained in:
parent
89b6209313
commit
50db4a59b8
3 changed files with 38 additions and 14 deletions
|
@ -30,7 +30,23 @@
|
|||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#if defined(_MSC_VER) && !defined(__clang__)
|
||||
#ifdef _MSC_VER
|
||||
/* 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. */
|
||||
|
||||
#ifdef __clang__
|
||||
#ifndef __PRFCHWINTRIN_H
|
||||
#define __PRFCHWINTRIN_H
|
||||
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||
_m_prefetch(void *__P)
|
||||
{
|
||||
__builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);
|
||||
}
|
||||
|
||||
#endif /* __PRFCHWINTRIN_H */
|
||||
#endif /* __clang__ */
|
||||
|
||||
#include <intrin.h>
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue