From: Nikos Mavrogiannopoulos Date: Wed, 25 Apr 2012 10:02:46 +0000 (+0200) Subject: Corrected win64 cpuid() code. Report and patch by Mann Ern Kang. X-Git-Tag: gnutls_3_0_21~141 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2da36bd42cca5f54564ff617ccb410b5ea8ad050;p=thirdparty%2Fgnutls.git Corrected win64 cpuid() code. Report and patch by Mann Ern Kang. --- diff --git a/devel/perlasm/cpuid-x86_64.pl b/devel/perlasm/cpuid-x86_64.pl index ef1c95c2a7..a6bb30ed7e 100644 --- a/devel/perlasm/cpuid-x86_64.pl +++ b/devel/perlasm/cpuid-x86_64.pl @@ -27,7 +27,7 @@ $code=".text\n"; $code.=<<___; .globl gnutls_cpuid -.type gnutls_cpuid,\@abi-omnipotent +.type gnutls_cpuid,\@function .align 16 gnutls_cpuid: pushq %rbp diff --git a/lib/accelerated/x86/coff/cpuid-x86-64-coff.s b/lib/accelerated/x86/coff/cpuid-x86-64-coff.s index c86b6457af..60e60461d8 100644 --- a/lib/accelerated/x86/coff/cpuid-x86-64-coff.s +++ b/lib/accelerated/x86/coff/cpuid-x86-64-coff.s @@ -25,6 +25,17 @@ .def gnutls_cpuid; .scl 2; .type 32; .endef .p2align 4 gnutls_cpuid: + movq %rdi,8(%rsp) + movq %rsi,16(%rsp) + movq %rsp,%rax +.LSEH_begin_gnutls_cpuid: + movq %rcx,%rdi + movq %rdx,%rsi + movq %r8,%rdx + movq %r9,%rcx + movq 40(%rsp),%r8 + movq 48(%rsp),%r9 + pushq %rbp movq %rsp,%rbp pushq %rbx @@ -52,5 +63,7 @@ gnutls_cpuid: movl %ecx,(%rax) popq %rbx leave + movq 8(%rsp),%rdi + movq 16(%rsp),%rsi .byte 0xf3,0xc3 - +.LSEH_end_gnutls_cpuid: