Corrected win64 cpuid() code. Report and patch by Mann Ern Kang.
[gnutls:gnutls.git] / lib / accelerated / x86 / coff / cpuid-x86-64-coff.s
1 #
2 # Copyright (C) 2011-2012 Free Software Foundation, Inc.
3 #
4 # Author: Nikos Mavrogiannopoulos
5 #
6 # This file is part of GnuTLS.
7 #
8 # The GnuTLS is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU Lesser General Public License
10 # as published by the Free Software Foundation; either version 3 of
11 # the License, or (at your option) any later version.
12 #
13 # This library is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 # Lesser General Public License for more details.
17 #
18 # You should have received a copy of the GNU Lesser General Public License
19 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 #
21 # *** This file is auto-generated ***
22 #
23 .text   
24 .globl  gnutls_cpuid
25 .def    gnutls_cpuid;   .scl 2; .type 32;       .endef
26 .p2align        4
27 gnutls_cpuid:
28         movq    %rdi,8(%rsp)
29         movq    %rsi,16(%rsp)
30         movq    %rsp,%rax
31 .LSEH_begin_gnutls_cpuid:
32         movq    %rcx,%rdi
33         movq    %rdx,%rsi
34         movq    %r8,%rdx
35         movq    %r9,%rcx
36         movq    40(%rsp),%r8
37         movq    48(%rsp),%r9
38
39         pushq   %rbp
40         movq    %rsp,%rbp
41         pushq   %rbx
42         movl    %edi,-12(%rbp)
43         movq    %rsi,-24(%rbp)
44         movq    %rdx,-32(%rbp)
45         movq    %rcx,-40(%rbp)
46         movq    %r8,-48(%rbp)
47         movl    -12(%rbp),%eax
48         movl    %eax,-60(%rbp)
49         movl    -60(%rbp),%eax
50         cpuid
51         movl    %edx,-56(%rbp)
52         movl    %ecx,%esi
53         movl    %eax,-52(%rbp)
54         movq    -24(%rbp),%rax
55         movl    -52(%rbp),%edx
56         movl    %edx,(%rax)
57         movq    -32(%rbp),%rax
58         movl    %ebx,(%rax)
59         movq    -40(%rbp),%rax
60         movl    %esi,(%rax)
61         movq    -48(%rbp),%rax
62         movl    -56(%rbp),%ecx
63         movl    %ecx,(%rax)
64         popq    %rbx
65         leave
66         movq    8(%rsp),%rdi
67         movq    16(%rsp),%rsi
68         .byte   0xf3,0xc3
69 .LSEH_end_gnutls_cpuid: