A refactoring back in 2016 in which magic numbers where extracted into
authoranton <anton@openbsd.org>
Tue, 4 Apr 2023 18:14:32 +0000 (18:14 +0000)
committeranton <anton@openbsd.org>
Tue, 4 Apr 2023 18:14:32 +0000 (18:14 +0000)
named constants accidentally dropped an instruction causing detection of
eXtended operations (XOP) on AMD hardware to break.

ok miod@ tb@

lib/libcrypto/x86_64cpuid.pl

index 2780b0f..1b67d11 100644 (file)
@@ -66,6 +66,7 @@ OPENSSL_ia32_cpuid:
        mov     %eax,%r10d
        mov     \$0x80000001,%eax
        cpuid
+       or      %ecx,%r9d
        and     \$IA32CAP_MASK1_AMD_XOP,%r9d    # isolate AMD XOP bit
        or      \$1,%r9d                        # make sure %r9d is not zero