]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CryptoPkg/Library/OpensslLib/IA32Gcc/crypto/x86cpuid.S
CryptoPkg/OpensslLib: Commit the auto-generated assembly files for IA32
[mirror_edk2.git] / CryptoPkg / Library / OpensslLib / IA32Gcc / crypto / x86cpuid.S
diff --git a/CryptoPkg/Library/OpensslLib/IA32Gcc/crypto/x86cpuid.S b/CryptoPkg/Library/OpensslLib/IA32Gcc/crypto/x86cpuid.S
new file mode 100644 (file)
index 0000000..a1934cb
--- /dev/null
@@ -0,0 +1,449 @@
+# WARNING: do not edit!\r
+# Generated from openssl/crypto/x86cpuid.pl\r
+#\r
+# Copyright 2004-2020 The OpenSSL Project Authors. All Rights Reserved.\r
+#\r
+# Licensed under the OpenSSL license (the "License").  You may not use\r
+# this file except in compliance with the License.  You can obtain a copy\r
+# in the file LICENSE in the source distribution or at\r
+# https://www.openssl.org/source/license.html\r
+\r
+.text\r
+.globl  OPENSSL_ia32_cpuid\r
+.type   OPENSSL_ia32_cpuid,@function\r
+.align  16\r
+OPENSSL_ia32_cpuid:\r
+.L_OPENSSL_ia32_cpuid_begin:\r
+        pushl   %ebp\r
+        pushl   %ebx\r
+        pushl   %esi\r
+        pushl   %edi\r
+        xorl    %edx,%edx\r
+        pushfl\r
+        popl    %eax\r
+        movl    %eax,%ecx\r
+        xorl    $2097152,%eax\r
+        pushl   %eax\r
+        popfl\r
+        pushfl\r
+        popl    %eax\r
+        xorl    %eax,%ecx\r
+        xorl    %eax,%eax\r
+        movl    20(%esp),%esi\r
+        movl    %eax,8(%esi)\r
+        btl     $21,%ecx\r
+        jnc     .L000nocpuid\r
+        .byte   0x0f,0xa2\r
+        movl    %eax,%edi\r
+        xorl    %eax,%eax\r
+        cmpl    $1970169159,%ebx\r
+        setne   %al\r
+        movl    %eax,%ebp\r
+        cmpl    $1231384169,%edx\r
+        setne   %al\r
+        orl     %eax,%ebp\r
+        cmpl    $1818588270,%ecx\r
+        setne   %al\r
+        orl     %eax,%ebp\r
+        jz      .L001intel\r
+        cmpl    $1752462657,%ebx\r
+        setne   %al\r
+        movl    %eax,%esi\r
+        cmpl    $1769238117,%edx\r
+        setne   %al\r
+        orl     %eax,%esi\r
+        cmpl    $1145913699,%ecx\r
+        setne   %al\r
+        orl     %eax,%esi\r
+        jnz     .L001intel\r
+        movl    $2147483648,%eax\r
+        .byte   0x0f,0xa2\r
+        cmpl    $2147483649,%eax\r
+        jb      .L001intel\r
+        movl    %eax,%esi\r
+        movl    $2147483649,%eax\r
+        .byte   0x0f,0xa2\r
+        orl     %ecx,%ebp\r
+        andl    $2049,%ebp\r
+        cmpl    $2147483656,%esi\r
+        jb      .L001intel\r
+        movl    $2147483656,%eax\r
+        .byte   0x0f,0xa2\r
+        movzbl  %cl,%esi\r
+        incl    %esi\r
+        movl    $1,%eax\r
+        xorl    %ecx,%ecx\r
+        .byte   0x0f,0xa2\r
+        btl     $28,%edx\r
+        jnc     .L002generic\r
+        shrl    $16,%ebx\r
+        andl    $255,%ebx\r
+        cmpl    %esi,%ebx\r
+        ja      .L002generic\r
+        andl    $4026531839,%edx\r
+        jmp     .L002generic\r
+.L001intel:\r
+        cmpl    $4,%edi\r
+        movl    $-1,%esi\r
+        jb      .L003nocacheinfo\r
+        movl    $4,%eax\r
+        movl    $0,%ecx\r
+        .byte   0x0f,0xa2\r
+        movl    %eax,%esi\r
+        shrl    $14,%esi\r
+        andl    $4095,%esi\r
+.L003nocacheinfo:\r
+        movl    $1,%eax\r
+        xorl    %ecx,%ecx\r
+        .byte   0x0f,0xa2\r
+        andl    $3220176895,%edx\r
+        cmpl    $0,%ebp\r
+        jne     .L004notintel\r
+        orl     $1073741824,%edx\r
+        andb    $15,%ah\r
+        cmpb    $15,%ah\r
+        jne     .L004notintel\r
+        orl     $1048576,%edx\r
+.L004notintel:\r
+        btl     $28,%edx\r
+        jnc     .L002generic\r
+        andl    $4026531839,%edx\r
+        cmpl    $0,%esi\r
+        je      .L002generic\r
+        orl     $268435456,%edx\r
+        shrl    $16,%ebx\r
+        cmpb    $1,%bl\r
+        ja      .L002generic\r
+        andl    $4026531839,%edx\r
+.L002generic:\r
+        andl    $2048,%ebp\r
+        andl    $4294965247,%ecx\r
+        movl    %edx,%esi\r
+        orl     %ecx,%ebp\r
+        cmpl    $7,%edi\r
+        movl    20(%esp),%edi\r
+        jb      .L005no_extended_info\r
+        movl    $7,%eax\r
+        xorl    %ecx,%ecx\r
+        .byte   0x0f,0xa2\r
+        movl    %ebx,8(%edi)\r
+.L005no_extended_info:\r
+        btl     $27,%ebp\r
+        jnc     .L006clear_avx\r
+        xorl    %ecx,%ecx\r
+.byte   15,1,208\r
+        andl    $6,%eax\r
+        cmpl    $6,%eax\r
+        je      .L007done\r
+        cmpl    $2,%eax\r
+        je      .L006clear_avx\r
+.L008clear_xmm:\r
+        andl    $4261412861,%ebp\r
+        andl    $4278190079,%esi\r
+.L006clear_avx:\r
+        andl    $4026525695,%ebp\r
+        andl    $4294967263,8(%edi)\r
+.L007done:\r
+        movl    %esi,%eax\r
+        movl    %ebp,%edx\r
+.L000nocpuid:\r
+        popl    %edi\r
+        popl    %esi\r
+        popl    %ebx\r
+        popl    %ebp\r
+        ret\r
+.size   OPENSSL_ia32_cpuid,.-.L_OPENSSL_ia32_cpuid_begin\r
+.globl  OPENSSL_rdtsc\r
+.type   OPENSSL_rdtsc,@function\r
+.align  16\r
+OPENSSL_rdtsc:\r
+.L_OPENSSL_rdtsc_begin:\r
+        xorl    %eax,%eax\r
+        xorl    %edx,%edx\r
+        leal    OPENSSL_ia32cap_P,%ecx\r
+        btl     $4,(%ecx)\r
+        jnc     .L009notsc\r
+        .byte   0x0f,0x31\r
+.L009notsc:\r
+        ret\r
+.size   OPENSSL_rdtsc,.-.L_OPENSSL_rdtsc_begin\r
+.globl  OPENSSL_instrument_halt\r
+.type   OPENSSL_instrument_halt,@function\r
+.align  16\r
+OPENSSL_instrument_halt:\r
+.L_OPENSSL_instrument_halt_begin:\r
+        leal    OPENSSL_ia32cap_P,%ecx\r
+        btl     $4,(%ecx)\r
+        jnc     .L010nohalt\r
+.long   2421723150\r
+        andl    $3,%eax\r
+        jnz     .L010nohalt\r
+        pushfl\r
+        popl    %eax\r
+        btl     $9,%eax\r
+        jnc     .L010nohalt\r
+        .byte   0x0f,0x31\r
+        pushl   %edx\r
+        pushl   %eax\r
+        hlt\r
+        .byte   0x0f,0x31\r
+        subl    (%esp),%eax\r
+        sbbl    4(%esp),%edx\r
+        addl    $8,%esp\r
+        ret\r
+.L010nohalt:\r
+        xorl    %eax,%eax\r
+        xorl    %edx,%edx\r
+        ret\r
+.size   OPENSSL_instrument_halt,.-.L_OPENSSL_instrument_halt_begin\r
+.globl  OPENSSL_far_spin\r
+.type   OPENSSL_far_spin,@function\r
+.align  16\r
+OPENSSL_far_spin:\r
+.L_OPENSSL_far_spin_begin:\r
+        pushfl\r
+        popl    %eax\r
+        btl     $9,%eax\r
+        jnc     .L011nospin\r
+        movl    4(%esp),%eax\r
+        movl    8(%esp),%ecx\r
+.long   2430111262\r
+        xorl    %eax,%eax\r
+        movl    (%ecx),%edx\r
+        jmp     .L012spin\r
+.align  16\r
+.L012spin:\r
+        incl    %eax\r
+        cmpl    (%ecx),%edx\r
+        je      .L012spin\r
+.long   529567888\r
+        ret\r
+.L011nospin:\r
+        xorl    %eax,%eax\r
+        xorl    %edx,%edx\r
+        ret\r
+.size   OPENSSL_far_spin,.-.L_OPENSSL_far_spin_begin\r
+.globl  OPENSSL_wipe_cpu\r
+.type   OPENSSL_wipe_cpu,@function\r
+.align  16\r
+OPENSSL_wipe_cpu:\r
+.L_OPENSSL_wipe_cpu_begin:\r
+        xorl    %eax,%eax\r
+        xorl    %edx,%edx\r
+        leal    OPENSSL_ia32cap_P,%ecx\r
+        movl    (%ecx),%ecx\r
+        btl     $1,(%ecx)\r
+        jnc     .L013no_x87\r
+.long   4007259865,4007259865,4007259865,4007259865,2430851995\r
+.L013no_x87:\r
+        leal    4(%esp),%eax\r
+        ret\r
+.size   OPENSSL_wipe_cpu,.-.L_OPENSSL_wipe_cpu_begin\r
+.globl  OPENSSL_atomic_add\r
+.type   OPENSSL_atomic_add,@function\r
+.align  16\r
+OPENSSL_atomic_add:\r
+.L_OPENSSL_atomic_add_begin:\r
+        movl    4(%esp),%edx\r
+        movl    8(%esp),%ecx\r
+        pushl   %ebx\r
+        nop\r
+        movl    (%edx),%eax\r
+.L014spin:\r
+        leal    (%eax,%ecx,1),%ebx\r
+        nop\r
+.long   447811568\r
+        jne     .L014spin\r
+        movl    %ebx,%eax\r
+        popl    %ebx\r
+        ret\r
+.size   OPENSSL_atomic_add,.-.L_OPENSSL_atomic_add_begin\r
+.globl  OPENSSL_cleanse\r
+.type   OPENSSL_cleanse,@function\r
+.align  16\r
+OPENSSL_cleanse:\r
+.L_OPENSSL_cleanse_begin:\r
+        movl    4(%esp),%edx\r
+        movl    8(%esp),%ecx\r
+        xorl    %eax,%eax\r
+        cmpl    $7,%ecx\r
+        jae     .L015lot\r
+        cmpl    $0,%ecx\r
+        je      .L016ret\r
+.L017little:\r
+        movb    %al,(%edx)\r
+        subl    $1,%ecx\r
+        leal    1(%edx),%edx\r
+        jnz     .L017little\r
+.L016ret:\r
+        ret\r
+.align  16\r
+.L015lot:\r
+        testl   $3,%edx\r
+        jz      .L018aligned\r
+        movb    %al,(%edx)\r
+        leal    -1(%ecx),%ecx\r
+        leal    1(%edx),%edx\r
+        jmp     .L015lot\r
+.L018aligned:\r
+        movl    %eax,(%edx)\r
+        leal    -4(%ecx),%ecx\r
+        testl   $-4,%ecx\r
+        leal    4(%edx),%edx\r
+        jnz     .L018aligned\r
+        cmpl    $0,%ecx\r
+        jne     .L017little\r
+        ret\r
+.size   OPENSSL_cleanse,.-.L_OPENSSL_cleanse_begin\r
+.globl  CRYPTO_memcmp\r
+.type   CRYPTO_memcmp,@function\r
+.align  16\r
+CRYPTO_memcmp:\r
+.L_CRYPTO_memcmp_begin:\r
+        pushl   %esi\r
+        pushl   %edi\r
+        movl    12(%esp),%esi\r
+        movl    16(%esp),%edi\r
+        movl    20(%esp),%ecx\r
+        xorl    %eax,%eax\r
+        xorl    %edx,%edx\r
+        cmpl    $0,%ecx\r
+        je      .L019no_data\r
+.L020loop:\r
+        movb    (%esi),%dl\r
+        leal    1(%esi),%esi\r
+        xorb    (%edi),%dl\r
+        leal    1(%edi),%edi\r
+        orb     %dl,%al\r
+        decl    %ecx\r
+        jnz     .L020loop\r
+        negl    %eax\r
+        shrl    $31,%eax\r
+.L019no_data:\r
+        popl    %edi\r
+        popl    %esi\r
+        ret\r
+.size   CRYPTO_memcmp,.-.L_CRYPTO_memcmp_begin\r
+.globl  OPENSSL_instrument_bus\r
+.type   OPENSSL_instrument_bus,@function\r
+.align  16\r
+OPENSSL_instrument_bus:\r
+.L_OPENSSL_instrument_bus_begin:\r
+        pushl   %ebp\r
+        pushl   %ebx\r
+        pushl   %esi\r
+        pushl   %edi\r
+        movl    $0,%eax\r
+        popl    %edi\r
+        popl    %esi\r
+        popl    %ebx\r
+        popl    %ebp\r
+        ret\r
+.size   OPENSSL_instrument_bus,.-.L_OPENSSL_instrument_bus_begin\r
+.globl  OPENSSL_instrument_bus2\r
+.type   OPENSSL_instrument_bus2,@function\r
+.align  16\r
+OPENSSL_instrument_bus2:\r
+.L_OPENSSL_instrument_bus2_begin:\r
+        pushl   %ebp\r
+        pushl   %ebx\r
+        pushl   %esi\r
+        pushl   %edi\r
+        movl    $0,%eax\r
+        popl    %edi\r
+        popl    %esi\r
+        popl    %ebx\r
+        popl    %ebp\r
+        ret\r
+.size   OPENSSL_instrument_bus2,.-.L_OPENSSL_instrument_bus2_begin\r
+.globl  OPENSSL_ia32_rdrand_bytes\r
+.type   OPENSSL_ia32_rdrand_bytes,@function\r
+.align  16\r
+OPENSSL_ia32_rdrand_bytes:\r
+.L_OPENSSL_ia32_rdrand_bytes_begin:\r
+        pushl   %edi\r
+        pushl   %ebx\r
+        xorl    %eax,%eax\r
+        movl    12(%esp),%edi\r
+        movl    16(%esp),%ebx\r
+        cmpl    $0,%ebx\r
+        je      .L021done\r
+        movl    $8,%ecx\r
+.L022loop:\r
+.byte   15,199,242\r
+        jc      .L023break\r
+        loop    .L022loop\r
+        jmp     .L021done\r
+.align  16\r
+.L023break:\r
+        cmpl    $4,%ebx\r
+        jb      .L024tail\r
+        movl    %edx,(%edi)\r
+        leal    4(%edi),%edi\r
+        addl    $4,%eax\r
+        subl    $4,%ebx\r
+        jz      .L021done\r
+        movl    $8,%ecx\r
+        jmp     .L022loop\r
+.align  16\r
+.L024tail:\r
+        movb    %dl,(%edi)\r
+        leal    1(%edi),%edi\r
+        incl    %eax\r
+        shrl    $8,%edx\r
+        decl    %ebx\r
+        jnz     .L024tail\r
+.L021done:\r
+        xorl    %edx,%edx\r
+        popl    %ebx\r
+        popl    %edi\r
+        ret\r
+.size   OPENSSL_ia32_rdrand_bytes,.-.L_OPENSSL_ia32_rdrand_bytes_begin\r
+.globl  OPENSSL_ia32_rdseed_bytes\r
+.type   OPENSSL_ia32_rdseed_bytes,@function\r
+.align  16\r
+OPENSSL_ia32_rdseed_bytes:\r
+.L_OPENSSL_ia32_rdseed_bytes_begin:\r
+        pushl   %edi\r
+        pushl   %ebx\r
+        xorl    %eax,%eax\r
+        movl    12(%esp),%edi\r
+        movl    16(%esp),%ebx\r
+        cmpl    $0,%ebx\r
+        je      .L025done\r
+        movl    $8,%ecx\r
+.L026loop:\r
+.byte   15,199,250\r
+        jc      .L027break\r
+        loop    .L026loop\r
+        jmp     .L025done\r
+.align  16\r
+.L027break:\r
+        cmpl    $4,%ebx\r
+        jb      .L028tail\r
+        movl    %edx,(%edi)\r
+        leal    4(%edi),%edi\r
+        addl    $4,%eax\r
+        subl    $4,%ebx\r
+        jz      .L025done\r
+        movl    $8,%ecx\r
+        jmp     .L026loop\r
+.align  16\r
+.L028tail:\r
+        movb    %dl,(%edi)\r
+        leal    1(%edi),%edi\r
+        incl    %eax\r
+        shrl    $8,%edx\r
+        decl    %ebx\r
+        jnz     .L028tail\r
+.L025done:\r
+        xorl    %edx,%edx\r
+        popl    %ebx\r
+        popl    %edi\r
+        ret\r
+.size   OPENSSL_ia32_rdseed_bytes,.-.L_OPENSSL_ia32_rdseed_bytes_begin\r
+.hidden OPENSSL_cpuid_setup\r
+.hidden OPENSSL_ia32cap_P\r
+.comm   OPENSSL_ia32cap_P,16,4\r
+.section        .init\r
+        call    OPENSSL_cpuid_setup\r