1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2024-11-10 22:59:13 +00:00

AARCH64 stub

This commit is contained in:
topilski 2019-07-13 21:10:34 +03:00
parent 96810180a0
commit b2e5b6ae2e
2 changed files with 9 additions and 1 deletions

View file

@ -180,6 +180,9 @@ void cpu_rdtsc(uint64_t* result)
#ifdef PLATFORM_ARM #ifdef PLATFORM_ARM
low_part = 0; low_part = 0;
hi_part = 0; hi_part = 0;
#elif defined(PLATFORM_AARCH64)
low_part = 0;
hi_part = 0;
#else #else
__asm __volatile ( __asm __volatile (
" rdtsc\n" " rdtsc\n"
@ -213,6 +216,7 @@ void busy_sse_loop(int cycles)
# define XALIGN ".align 4\n" # define XALIGN ".align 4\n"
#endif #endif
#ifdef PLATFORM_ARM #ifdef PLATFORM_ARM
#elif defined(PLATFORM_AARCH64)
#else #else
__asm __volatile ( __asm __volatile (
" xorps %%xmm0, %%xmm0\n" " xorps %%xmm0, %%xmm0\n"

View file

@ -55,11 +55,15 @@
#if !defined(PLATFORM_ARM) #if !defined(PLATFORM_ARM)
# define PLATFORM_ARM # define PLATFORM_ARM
#endif #endif
#elif defined(__aarch64__)
#if !defined(PLATFORM_ARM)
# define PLATFORM_AARCH64
#endif
#endif #endif
/* Under Windows/AMD64 with MSVC, inline assembly isn't supported */ /* Under Windows/AMD64 with MSVC, inline assembly isn't supported */
#if (((defined(COMPILER_GCC) || defined(COMPILER_CLANG))) && \ #if (((defined(COMPILER_GCC) || defined(COMPILER_CLANG))) && \
(defined(PLATFORM_X64) || defined(PLATFORM_X86) || defined(PLATFORM_ARM))) || \ (defined(PLATFORM_X64) || defined(PLATFORM_X86) || defined(PLATFORM_ARM) || defined(PLATFORM_AARCH64))) || \
(defined(COMPILER_MICROSOFT) && defined(PLATFORM_X86)) (defined(COMPILER_MICROSOFT) && defined(PLATFORM_X86))
# define INLINE_ASM_SUPPORTED # define INLINE_ASM_SUPPORTED
#endif #endif