mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Dep/g3d: Support ARM with MSVC
This commit is contained in:
37
dep/g3dlite/G3D-v9.0 hotfix18.diff
Normal file
37
dep/g3dlite/G3D-v9.0 hotfix18.diff
Normal file
@@ -0,0 +1,37 @@
|
||||
diff --git a/dep/g3dlite/source/System.cpp b/dep/g3dlite/source/System.cpp
|
||||
index 4a75d320b8..1c7d913929 100644
|
||||
--- a/dep/g3dlite/source/System.cpp
|
||||
+++ b/dep/g3dlite/source/System.cpp
|
||||
@@ -79,7 +79,7 @@
|
||||
#endif
|
||||
|
||||
// SIMM include
|
||||
-#if !defined(__aarch64__)
|
||||
+#if !defined(_M_ARM) && !defined(_M_ARM64) && !defined(_M_HYBRID_X86_ARM64) && !defined(_M_ARM64EC) && !defined(__aarch64__)
|
||||
#include <xmmintrin.h>
|
||||
#endif
|
||||
|
||||
@@ -211,6 +211,10 @@ void System::init() {
|
||||
arch = "ARM";
|
||||
break;
|
||||
|
||||
+ case PROCESSOR_ARCHITECTURE_ARM64:
|
||||
+ arch = "ARM64";
|
||||
+ break;
|
||||
+
|
||||
default:
|
||||
arch = "Unknown";
|
||||
break;
|
||||
@@ -1690,8 +1694,12 @@ std::string System::currentTimeString() {
|
||||
|
||||
// Windows 64-bit
|
||||
void System::cpuid(CPUIDFunction func, uint32& eax, uint32& ebx, uint32& ecx, uint32& edx) {
|
||||
+#if !defined(_M_ARM) && !defined(_M_ARM64) && !defined(_M_HYBRID_X86_ARM64) && !defined(_M_ARM64EC)
|
||||
int regs[4] = {eax, ebx, ecx, edx};
|
||||
__cpuid(regs, func);
|
||||
+#else
|
||||
+ int regs[4] = { 0, 0, 0, 0 };
|
||||
+#endif
|
||||
eax = regs[0];
|
||||
ebx = regs[1];
|
||||
ecx = regs[2];
|
||||
@@ -79,7 +79,7 @@
|
||||
#endif
|
||||
|
||||
// SIMM include
|
||||
#if !defined(__aarch64__)
|
||||
#if !defined(_M_ARM) && !defined(_M_ARM64) && !defined(_M_HYBRID_X86_ARM64) && !defined(_M_ARM64EC) && !defined(__aarch64__)
|
||||
#include <xmmintrin.h>
|
||||
#endif
|
||||
|
||||
@@ -211,6 +211,10 @@ void System::init() {
|
||||
arch = "ARM";
|
||||
break;
|
||||
|
||||
case PROCESSOR_ARCHITECTURE_ARM64:
|
||||
arch = "ARM64";
|
||||
break;
|
||||
|
||||
default:
|
||||
arch = "Unknown";
|
||||
break;
|
||||
@@ -1690,8 +1694,12 @@ std::string System::currentTimeString() {
|
||||
|
||||
// Windows 64-bit
|
||||
void System::cpuid(CPUIDFunction func, uint32& eax, uint32& ebx, uint32& ecx, uint32& edx) {
|
||||
#if !defined(_M_ARM) && !defined(_M_ARM64) && !defined(_M_HYBRID_X86_ARM64) && !defined(_M_ARM64EC)
|
||||
int regs[4] = {eax, ebx, ecx, edx};
|
||||
__cpuid(regs, func);
|
||||
#else
|
||||
int regs[4] = { 0, 0, 0, 0 };
|
||||
#endif
|
||||
eax = regs[0];
|
||||
ebx = regs[1];
|
||||
ecx = regs[2];
|
||||
|
||||
Reference in New Issue
Block a user