From 81ab782a6375d6c788573ef2c04c93cc89cb5cc4 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 22 May 2025 12:05:12 -0400 Subject: [PATCH] polyval: clean up cpuid code (Based on comments by Alex Xu) --- src/ext/polyval/polyval.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ext/polyval/polyval.c b/src/ext/polyval/polyval.c index 900a50385b..69e6e0c2c5 100644 --- a/src/ext/polyval/polyval.c +++ b/src/ext/polyval/polyval.c @@ -431,10 +431,10 @@ PV_DECLARE(, , u128_from_bytes_ctmul, void polyval_detect_implementation(void) { - unsigned int eax, ebc, ecx, edx; + unsigned int eax, ebx, ecx, edx; use_pclmul = false; - if (__get_cpuid(1, &eax, &ebc, &ecx, &edx)) { - if (0 != (ecx & (1<<1))) { + if (__get_cpuid(1, &eax, &ebx, &ecx, &edx)) { + if (0 != (ecx & bit_PCLMUL)) { use_pclmul = true; } } -- 2.47.2