提交 f8418d87 编写于 作者: A Andy Polyakov

crypto/x86_64cpuid.pl: move extended feature detection upwards.

Exteneded feature flags were not pulled on AMD processors, as result a
number of extensions were effectively masked on Ryzen. It should have
been reported for Excavator since it implements AVX2 extension, but
apparently nobody noticed or cared...
Reviewed-by: NRich Salz <rsalz@openssl.org>
上级 ee6d9dfb
...@@ -72,6 +72,16 @@ OPENSSL_ia32_cpuid: ...@@ -72,6 +72,16 @@ OPENSSL_ia32_cpuid:
cpuid cpuid
mov %eax,%r11d # max value for standard query level mov %eax,%r11d # max value for standard query level
cmp \$7,%eax
jb .Lno_extended_info
mov \$7,%eax
xor %ecx,%ecx
cpuid
mov %ebx,8(%rdi)
.Lno_extended_info:
xor %eax,%eax xor %eax,%eax
cmp \$0x756e6547,%ebx # "Genu" cmp \$0x756e6547,%ebx # "Genu"
setne %al setne %al
...@@ -136,14 +146,6 @@ OPENSSL_ia32_cpuid: ...@@ -136,14 +146,6 @@ OPENSSL_ia32_cpuid:
shr \$14,%r10d shr \$14,%r10d
and \$0xfff,%r10d # number of cores -1 per L1D 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: .Lnocacheinfo:
mov \$1,%eax mov \$1,%eax
cpuid cpuid
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册