summaryrefslogtreecommitdiffstats
path: root/secure/lib/libcrypto/amd64/x86_64cpuid.S
diff options
context:
space:
mode:
Diffstat (limited to 'secure/lib/libcrypto/amd64/x86_64cpuid.S')
-rw-r--r--secure/lib/libcrypto/amd64/x86_64cpuid.S17
1 files changed, 16 insertions, 1 deletions
diff --git a/secure/lib/libcrypto/amd64/x86_64cpuid.S b/secure/lib/libcrypto/amd64/x86_64cpuid.S
index d66eeaa5..820960a 100644
--- a/secure/lib/libcrypto/amd64/x86_64cpuid.S
+++ b/secure/lib/libcrypto/amd64/x86_64cpuid.S
@@ -118,8 +118,19 @@ OPENSSL_ia32_cpuid:
orl $0x40000000,%edx
andb $15,%ah
cmpb $15,%ah
- jne .Lnotintel
+ jne .LnotP4
orl $0x00100000,%edx
+.LnotP4:
+ cmpb $6,%ah
+ jne .Lnotintel
+ andl $0x0fff0ff0,%eax
+ cmpl $0x00050670,%eax
+ je .Lknights
+ cmpl $0x00080650,%eax
+ jne .Lnotintel
+.Lknights:
+ andl $0xfbffffff,%ecx
+
.Lnotintel:
btl $28,%edx
jnc .Lgeneric
@@ -144,6 +155,10 @@ OPENSSL_ia32_cpuid:
movl $7,%eax
xorl %ecx,%ecx
cpuid
+ btl $26,%r9d
+ jc .Lnotknights
+ andl $0xfff7ffff,%ebx
+.Lnotknights:
movl %ebx,8(%rdi)
.Lno_extended_info:
OpenPOWER on IntegriCloud