svn commit: r322407 - head/sys/libkern/x86
Ryan Libby
rlibby at FreeBSD.org
Fri Aug 11 17:05:32 UTC 2017
Author: rlibby
Date: Fri Aug 11 17:05:31 2017
New Revision: 322407
URL: https://svnweb.freebsd.org/changeset/base/322407
Log:
x86/crc32_sse42.c: quiet unused function warning
Reviewed by: cem
Approved by: markj (mentor)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D11980
Modified:
head/sys/libkern/x86/crc32_sse42.c
Modified: head/sys/libkern/x86/crc32_sse42.c
==============================================================================
--- head/sys/libkern/x86/crc32_sse42.c Fri Aug 11 16:32:24 2017 (r322406)
+++ head/sys/libkern/x86/crc32_sse42.c Fri Aug 11 17:05:31 2017 (r322407)
@@ -52,19 +52,21 @@ _mm_crc32_u8(uint32_t x, uint8_t y)
return (x);
}
-static __inline uint32_t
-_mm_crc32_u32(uint32_t x, uint32_t y)
-{
- __asm("crc32l %1,%0" : "+r" (x) : "r" (y));
- return (x);
-}
-
+#ifdef __amd64__
static __inline uint64_t
_mm_crc32_u64(uint64_t x, uint64_t y)
{
__asm("crc32q %1,%0" : "+r" (x) : "r" (y));
return (x);
}
+#else
+static __inline uint32_t
+_mm_crc32_u32(uint32_t x, uint32_t y)
+{
+ __asm("crc32l %1,%0" : "+r" (x) : "r" (y));
+ return (x);
+}
+#endif
/* CRC-32C (iSCSI) polynomial in reversed bit order. */
#define POLY 0x82f63b78
More information about the svn-src-all
mailing list