]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fixed crc32 assembly not returning hash value to correct variable.
authorNathan Moinvaziri <nathan@nathanm.com>
Wed, 29 Dec 2021 23:51:00 +0000 (15:51 -0800)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Fri, 7 Jan 2022 23:03:05 +0000 (00:03 +0100)
arch/x86/insert_string_sse.c
cmake/detect-intrinsics.cmake

index 7a63b2a7bfd75487148ccff404fca0bc90e2e928..b33a2c7ccbb04fa6940e8fb3ed8da4858fe269c4 100644 (file)
@@ -26,7 +26,7 @@
         __asm mov edx, h\
         __asm mov eax, val\
         __asm crc32 eax, edx\
-        __asm mov val, eax\
+        __asm mov h, eax\
     }
 #  else
 #    define HASH_CALC(s, h, val) \
index 39ae19ae968bff0bd6b1451dfc75de4ad3c18d39..e03daaa1360a335ebe967818618a5637998cf445 100644 (file)
@@ -230,7 +230,7 @@ macro(check_sse4_intrinsics)
         "int main(void) {
             unsigned val = 0, h = 0;
         #if defined(_MSC_VER)
-            { __asm mov edx, h __asm mov eax, val __asm crc32 eax, edx __asm mov val, eax }
+            { __asm mov edx, h __asm mov eax, val __asm crc32 eax, edx __asm mov h, eax }
         #else
             __asm__ __volatile__ ( \"crc32 %1,%0\" : \"+r\" (h) : \"r\" (val) );
         #endif