=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: ntdll: Check for ARMv7 architecture dynamically when loading a PE.

Alexandre Julliard julliard at winehq.org
Mon Jun 25 13:24:11 CDT 2012


Module: wine
Branch: master
Commit: 567e44161c37be60a059f2f51acbda4a4ca12b35
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=567e44161c37be60a059f2f51acbda4a4ca12b35

Author: André Hentschel <nerv at dawncrow.de>
Date:   Mon Jun 25 00:25:28 2012 +0200

ntdll: Check for ARMv7 architecture dynamically when loading a PE.

---

 dlls/ntdll/virtual.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index d67f2d5..806b7a9 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -1061,11 +1061,15 @@ static NTSTATUS check_architecture( const IMAGE_NT_HEADERS *nt )
     }
 #elif defined(__arm__) && !defined(__ARMEB__)
     if (nt->FileHeader.Machine == IMAGE_FILE_MACHINE_ARM ||
-#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__)
-        nt->FileHeader.Machine == IMAGE_FILE_MACHINE_ARMV7 ||
-#endif
         nt->FileHeader.Machine == IMAGE_FILE_MACHINE_THUMB)
         return STATUS_SUCCESS;
+    if (nt->FileHeader.Machine == IMAGE_FILE_MACHINE_ARMV7)
+    {
+        SYSTEM_CPU_INFORMATION sci;
+        if (SUCCEEDED(NtQuerySystemInformation( SystemCpuInformation, &sci, sizeof(sci), NULL )) &&
+            sci.Architecture == PROCESSOR_ARCHITECTURE_ARM && sci.Level >= 7)
+            return STATUS_SUCCESS;
+    }
 #endif
 
     switch (nt->FileHeader.Machine)




More information about the wine-cvs mailing list