Alexandre Julliard : wineboot: Only use cpuid on platforms where it makes sense.

Alexandre Julliard julliard at winehq.org
Tue Aug 13 14:54:34 CDT 2019


Module: wine
Branch: master
Commit: 44ee1c47ff8c76a64ac8760d53a483749f9bb1fb
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=44ee1c47ff8c76a64ac8760d53a483749f9bb1fb

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Aug 13 20:24:48 2019 +0200

wineboot: Only use cpuid on platforms where it makes sense.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/wineboot/wineboot.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c
index 55f2c6c..add8c47 100644
--- a/programs/wineboot/wineboot.c
+++ b/programs/wineboot/wineboot.c
@@ -185,6 +185,8 @@ static DWORD set_reg_value( HKEY hkey, const WCHAR *name, const WCHAR *value )
     return RegSetValueExW( hkey, name, 0, REG_SZ, (const BYTE *)value, (lstrlenW(value) + 1) * sizeof(WCHAR) );
 }
 
+#if defined(__i386__) || defined(__x86_64__)
+
 #if defined(_MSC_VER)
 static void do_cpuid( unsigned int ax, unsigned int *p )
 {
@@ -205,7 +207,7 @@ __ASM_GLOBAL_FUNC( do_cpuid,
                    "popl %ebx\n\t"
                    "popl %esi\n\t"
                    "ret" )
-#elif defined(__x86_64__)
+#else
 extern void __cdecl do_cpuid( unsigned int ax, unsigned int *p );
 __ASM_GLOBAL_FUNC( do_cpuid,
                    "pushq %rsi\n\t"
@@ -220,11 +222,6 @@ __ASM_GLOBAL_FUNC( do_cpuid,
                    "popq %rbx\n\t"
                    "popq %rsi\n\t"
                    "ret" )
-#else
-static void do_cpuid( unsigned int ax, unsigned int *p )
-{
-    FIXME("\n");
-}
 #endif
 
 static void regs_to_str( unsigned int *regs, unsigned int len, WCHAR *buffer )
@@ -291,6 +288,14 @@ static void get_namestring( WCHAR *buf )
     for (i = lstrlenW(buf) - 1; i >= 0 && buf[i] == ' '; i--) buf[i] = 0;
 }
 
+#else  /* __i386__ || __x86_64__ */
+
+static void get_identifier( WCHAR *buf, size_t size, const WCHAR *arch ) { }
+static void get_vendorid( WCHAR *buf ) { }
+static void get_namestring( WCHAR *buf ) { }
+
+#endif  /* __i386__ || __x86_64__ */
+
 /* create the volatile hardware registry keys */
 static void create_hardware_registry_keys(void)
 {




More information about the wine-cvs mailing list