OPENSSL_ia32cap: reserve for new extensions.
[openssl.git] / crypto / x86_64cpuid.pl
index da6d4a232bbcd9a7608db54a50feb251854f9e5f..7c8952e7214c8108090a2cf5c62e47317c38f04d 100644 (file)
@@ -68,7 +68,7 @@ OPENSSL_ia32_cpuid:
 .cfi_register  %rbx,%r8
 
        xor     %eax,%eax
-       mov     %eax,8(%rdi)            # clear extended feature flags
+       mov     %rax,8(%rdi)            # clear extended feature flags
        cpuid
        mov     %eax,%r11d              # max value for standard query level
 
@@ -187,6 +187,7 @@ OPENSSL_ia32_cpuid:
        and     \$0xfff7ffff,%ebx       # clear ADCX/ADOX flag
 .Lnotknights:
        mov     %ebx,8(%rdi)            # save extended feature flags
+       mov     %ecx,12(%rdi)
 .Lno_extended_info:
 
        bt      \$27,%r9d               # check OSXSAVE bit
@@ -207,7 +208,7 @@ OPENSSL_ia32_cpuid:
        mov     \$0xefffe7ff,%eax       # ~(1<<28|1<<12|1<<11)
        and     %eax,%r9d               # clear AVX, FMA and AMD XOP bits
        mov     \$0x3fdeffdf,%eax       # ~(1<<31|1<<30|1<<21|1<<16|1<<5)
-       and     %eax,8(%rdi)            # cleax AVX2 and AVX512* bits
+       and     %eax,8(%rdi)            # clear AVX2 and AVX512* bits
 .Ldone:
        shl     \$32,%r9
        mov     %r10d,%eax