Commit f22119f1 authored by Stiopa Koltsov's avatar Stiopa Koltsov Committed by Facebook Github Bot

Fix SSE4.2 detection in F14Table.h

Summary: `_mm_crc32_u64` requires SSE 4.2, not just any SSE.

Reviewed By: vener91

Differential Revision: D16032673

fbshipit-source-id: 13cb6299e14184b30a9a04f2644aee2f0cd1a60e
parent 7af588f6
......@@ -1093,7 +1093,7 @@ class F14Table : public Policy {
std::size_t tag;
if (!isAvalanchingHasher()) {
#if FOLLY_F14_CRC_INTRINSIC_AVAILABLE
#if FOLLY_SSE
#if FOLLY_SSE_PREREQ(4, 2)
// SSE4.2 CRC
std::size_t c = _mm_crc32_u64(0, hash);
tag = (c >> 24) | 0x80;
......@@ -1144,7 +1144,7 @@ class F14Table : public Policy {
uint8_t tag;
if (!isAvalanchingHasher()) {
#if FOLLY_F14_CRC_INTRINSIC_AVAILABLE
#if FOLLY_SSE
#if FOLLY_SSE_PREREQ(4, 2)
// SSE4.2 CRC
auto c = _mm_crc32_u32(0, hash);
tag = static_cast<uint8_t>(~(c >> 25));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment