Commit 18bedc23 authored by Brian Pane's avatar Brian Pane Committed by Jordan DeLong

Enable the __builtin_ia32_crc* acceleration functions for gcc-4.7

Summary:
Adjusted the ifdefs to allow the use of the hardware CRC instructions
when compiling with gcc-4.7.x

Test Plan:
Built with gcc-4.7.1, ran the unit tests, verified that they ran the
hardware-accelerated code path

Reviewed By: saramg@fb.com

FB internal diff: D1134567
parent 5cbaa0fd
...@@ -25,7 +25,7 @@ namespace folly { ...@@ -25,7 +25,7 @@ namespace folly {
namespace detail { namespace detail {
#if defined(__x86_64__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && \ #if defined(__x86_64__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && \
(((__GNUC__ * 100) + __GNUC_MINOR__) >= 408) (((__GNUC__ * 100) + __GNUC_MINOR__) >= 407)
// Fast SIMD implementation of CRC-32C for x86 with SSE 4.2 // Fast SIMD implementation of CRC-32C for x86 with SSE 4.2
uint32_t crc32c_hw(const uint8_t *data, size_t nbytes, uint32_t crc32c_hw(const uint8_t *data, size_t nbytes,
......
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