Move and rename SDL_rdtsc macro to testautomation
parent
a06046c55c
commit
46f5c1fe6a
|
@ -110,15 +110,6 @@ _m_prefetch(void *__P)
|
|||
#endif
|
||||
|
||||
#if defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || defined(_M_IX86)
|
||||
# if (defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4)) || defined(__clang__) || defined(__ICC)) && !defined(SDL_DISABLE_RDTSC)
|
||||
# define SDL_RDTSC_INTRINSICS 1
|
||||
# if defined(_MSC_VER)
|
||||
# include <intrin.h>
|
||||
# else
|
||||
# include <x86intrin.h>
|
||||
# endif
|
||||
# define SDL_rdtsc __rdtsc
|
||||
# endif
|
||||
# if ((defined(_MSC_VER) && !defined(_M_X64)) || defined(__MMX__) || defined(SDL_HAS_TARGET_ATTRIBS)) && !defined(SDL_DISABLE_MMX)
|
||||
# define SDL_MMX_INTRINSICS 1
|
||||
# include <mmintrin.h>
|
||||
|
|
|
@ -10,6 +10,19 @@
|
|||
#include <SDL3/SDL_test.h>
|
||||
#include "testautomation_suites.h"
|
||||
|
||||
#if (defined(_MSC_VER) \
|
||||
|| (defined(__GNUC__) && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 5)) \
|
||||
|| (defined(__clang__) && (__clang_major__ > 3 || __clang_major__ == 3 && __clang_minor__ >= 5)) \
|
||||
|| defined(__ICC)) && !defined(SDL_DISABLE_RDTSC)
|
||||
# define SDL_RDTSC_INTRINSICS 1
|
||||
# if defined(_MSC_VER)
|
||||
# include <intrin.h>
|
||||
# else
|
||||
# include <x86intrin.h>
|
||||
# endif
|
||||
# define SDLTest_rdtsc __rdtsc
|
||||
#endif
|
||||
|
||||
// FIXME: missing tests for loongarch lsx/lasx
|
||||
// FIXME: missing tests for powerpc altivec
|
||||
|
||||
|
@ -368,7 +381,7 @@ static int intrinsics_testRDTSC(void *arg)
|
|||
{
|
||||
Sint64 ticks;
|
||||
|
||||
ticks = SDL_rdtsc();
|
||||
ticks = SDLTest_rdtsc();
|
||||
|
||||
SDLTest_AssertCheck(SDL_TRUE, "rdtsc returned: %" SDL_PRIu64 " ticks", ticks);
|
||||
|
||||
|
|
Loading…
Reference in New Issue