Date: Fri, 11 Aug 2017 17:05:31 +0000 (UTC) From: Ryan Libby <rlibby@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322407 - head/sys/libkern/x86 Message-ID: <201708111705.v7BH5V7r088966@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708111705.v7BH5V7r088966>