1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-11 19:24:11 +01:00

build: Support building for ARM64EC

When targeting ARM64EC, both __x86_64__ and _M_X86_64 are defined but
not all x86 intrinsics are present, treat EC as regular ARM64 so the
native intrinsics are used instead.
This commit is contained in:
Billy Laws 2024-03-09 05:43:46 +00:00 committed by GitHub
parent 15ddadc4de
commit 0776d764a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View File

@ -5355,7 +5355,7 @@ namespace dxvk {
// Round to nearest // Round to nearest
_controlfp(_RC_NEAR, _MCW_RC); _controlfp(_RC_NEAR, _MCW_RC);
#elif (defined(__GNUC__) || defined(__MINGW32__)) && (defined(__i386__) || defined(__x86_64__) || defined(__ia64)) #elif (defined(__GNUC__) || defined(__MINGW32__)) && (defined(__i386__) || (defined(__x86_64__) && !defined(__arm64ec__)) || defined(__ia64))
// For GCC/MinGW we can use inline asm to set it. // For GCC/MinGW we can use inline asm to set it.
// This only works for x86 and x64 processors however. // This only works for x86 and x64 processors however.

View File

@ -1,11 +1,12 @@
#pragma once #pragma once
#if defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || defined(_M_IX86) || defined(__e2k__) #if (defined(__x86_64__) && !defined(__arm64ec__)) || (defined(_M_X64) && !defined(_M_ARM64EC)) \
|| defined(__i386__) || defined(_M_IX86) || defined(__e2k__)
#define DXVK_ARCH_X86 #define DXVK_ARCH_X86
#if defined(__x86_64__) || defined(_M_X64) || defined(__e2k__) #if defined(__x86_64__) || defined(_M_X64) || defined(__e2k__)
#define DXVK_ARCH_X86_64 #define DXVK_ARCH_X86_64
#endif #endif
#elif defined(__aarch64__) || defined(_M_ARM64) #elif defined(__aarch64__) || defined(_M_ARM64) || defined(_M_ARM64EC)
#define DXVK_ARCH_ARM64 #define DXVK_ARCH_ARM64
#else #else
#error "Unknown CPU Architecture" #error "Unknown CPU Architecture"