X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fx86_64cpuid.pl;h=2467af7e9e70b695b74611d78fd79df36aeae590;hp=e08e1c4a1103469d32054d06a4c72dff201f5511;hb=b997adb3a518b065240e70acf38ec5f77a937f53;hpb=5e32cfb2b6aec4d8d80083dabbd25bf89a482f21 diff --git a/crypto/x86_64cpuid.pl b/crypto/x86_64cpuid.pl index e08e1c4a11..2467af7e9e 100644 --- a/crypto/x86_64cpuid.pl +++ b/crypto/x86_64cpuid.pl @@ -68,7 +68,7 @@ OPENSSL_ia32_cpuid: .cfi_register %rbx,%r8 xor %eax,%eax - mov %eax,8(%rdi) # clear 3rd word + mov %eax,8(%rdi) # clear extended feature flags cpuid mov %eax,%r11d # max value for standard query level @@ -136,14 +136,6 @@ OPENSSL_ia32_cpuid: shr \$14,%r10d and \$0xfff,%r10d # number of cores -1 per L1D - cmp \$7,%r11d - jb .Lnocacheinfo - - mov \$7,%eax - xor %ecx,%ecx - cpuid - mov %ebx,8(%rdi) - .Lnocacheinfo: mov \$1,%eax cpuid @@ -173,6 +165,15 @@ OPENSSL_ia32_cpuid: or %ecx,%r9d # merge AMD XOP flag mov %edx,%r10d # %r9d:%r10d is copy of %ecx:%edx + + cmp \$7,%r11d + jb .Lno_extended_info + mov \$7,%eax + xor %ecx,%ecx + cpuid + mov %ebx,8(%rdi) # save extended feature flags +.Lno_extended_info: + bt \$27,%r9d # check OSXSAVE bit jnc .Lclear_avx xor %ecx,%ecx # XCR0