Skip to content

Commit

Permalink
Fixed use of cpuid on ARM.
Browse files Browse the repository at this point in the history
  • Loading branch information
DragonJoker committed Apr 29, 2024
1 parent aa23534 commit 8af10ac
Show file tree
Hide file tree
Showing 8 changed files with 324 additions and 610 deletions.
26 changes: 26 additions & 0 deletions include/Core/CastorUtils/Config/PlatformConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,32 @@ See LICENSE file in root folder
# define CU_PlatformApple
#endif

#if defined( __x86_64__ ) || defined( _M_X64 )
# define CU_ArchX86_64
#elif defined(i386) || defined(__i386__) || defined(__i386) || defined(_M_IX86)
# define CU_ArchX86_32
#elif defined(__ARM_ARCH_2__)
# define CU_ArchARM2
#elif defined(__ARM_ACH_3__) || defined(__ARM_ARCH_3M__)
# define CU_ArchARMv3
#elif defined(__ARM_ARCH_4T__) || defined(__TARGET_ARM_4T)
# define CU_ArchARM4T
#elif defined(__ARM_ARCH_5_) || defined(__ARM_ARCH_5E_)
# define CU_ArchARM5
#elif defined(__ARM_ARCH_5T_) || defined(__ARM_ARCH_5TE_) || defined(__ARM_ARCH_5TEJ_)
# define CU_ArchARM5T
#elif defined(__ARM_ARCH_6T2_)
# define CU_ArchARM6T2
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__)
# define CU_ArchARM6
#elif defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__)
# define CU_ArchARM7
#elif defined(__aarch64__) || defined(_M_ARM64)
# define CU_ArchARM64
#else
# error "Yet unsupported architecture"
#endif

#if defined( CU_PlatformWindows )
# if defined( CastorUtils_EXPORTS )
# define CU_API __declspec(dllexport)
Expand Down
Loading

0 comments on commit 8af10ac

Please sign in to comment.