summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x86_arch.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Provide crypto_cpu_caps_init() for amd64.jsing2024-10-181-1/+6
| | | | | | | | | | | This is a CPU capability detection implementation in C, with minimal inline assembly (for cpuid and xgetbv). This replaces the assembly mess generated by x86_64cpuid.pl. Rather than populating OPENSSL_ia32cap_P directly with CPUID output, just set the bits that the remaining perlasm checks (namely AESNI, AVX, FXSR, INTEL, HT, MMX, PCLMUL, SSE, SSE2 and SSSE3). ok joshua@ tb@
* Replace all uses of magic numbers when operating on OPENSSL_ia32_P[] bymiod2016-11-041-0/+90
meaningful constants in a private header file, so that reviewers can actually get a chance to figure out what the code is attempting to do without knowing all cpuid bits. While there, turn it from an array of two 32-bit ints into a properly aligned 64-bit int. Use of OPENSSL_ia32_P is now restricted to the assembler parts. C code will now always use OPENSSL_cpu_caps() and check for the proper bits in the whole 64-bit word it returns. i386 tests and ok jsing@