[PATCH] wineboot: Fix cpuid asm wrapper to use ms_abi convention.

Hans Leidekker hans at codeweavers.com
Sat Jul 6 08:56:28 CDT 2019


Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47464
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
---
 programs/wineboot/wineboot.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c
index 834bf92730..f7908561a9 100644
--- a/programs/wineboot/wineboot.c
+++ b/programs/wineboot/wineboot.c
@@ -207,14 +207,17 @@ __ASM_GLOBAL_FUNC( do_cpuid,
                    "ret" )
 #elif defined(__x86_64__)
 __ASM_GLOBAL_FUNC( do_cpuid,
+                   "pushq %rsi\n\t"
                    "pushq %rbx\n\t"
-                   "movl %edi,%eax\n\t"
+                   "movq %rcx,%rax\n\t"
+                   "movq %rdx,%rsi\n\t"
                    "cpuid\n\t"
                    "movl %eax,(%rsi)\n\t"
                    "movl %ebx,4(%rsi)\n\t"
                    "movl %ecx,8(%rsi)\n\t"
                    "movl %edx,12(%rsi)\n\t"
                    "popq %rbx\n\t"
+                   "popq %rsi\n\t"
                    "ret" )
 #else
 void do_cpuid( unsigned int ax, unsigned int *p )
-- 
2.11.0




More information about the wine-devel mailing list