projects
/
folly.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make Optional nothrow_default_constructible
[folly.git]
/
folly
/
Checksum.cpp
diff --git
a/folly/Checksum.cpp
b/folly/Checksum.cpp
index 881fc7d20ff1ff3aa483319c4d290e5fd585e153..d8daf66fcd11bd55efebb48403a2b7cba047d9ab 100644
(file)
--- a/
folly/Checksum.cpp
+++ b/
folly/Checksum.cpp
@@
-1,5
+1,5
@@
/*
/*
- * Copyright 201
4
Facebook, Inc.
+ * Copyright 201
5
Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-25,13
+25,15
@@
namespace folly {
namespace detail {
#ifndef __has_builtin
namespace detail {
#ifndef __has_builtin
+ /* nolint */
#define __has_builtin(x) 0
#endif
#define __has_builtin(x) 0
#endif
-#if (__has_builtin(__builtin_ia32_crc32qi) && \
+#if __SSE4_2__ && \
+ ((__has_builtin(__builtin_ia32_crc32qi) && \
__has_builtin(__builtin_ia32_crc32di)) || \
(FOLLY_X64 && defined(__GNUC__) && defined(__GNUC_MINOR__) && \
__has_builtin(__builtin_ia32_crc32di)) || \
(FOLLY_X64 && defined(__GNUC__) && defined(__GNUC_MINOR__) && \
- (((__GNUC__ * 100) + __GNUC_MINOR__) >= 407))
+ (((__GNUC__ * 100) + __GNUC_MINOR__) >= 407))
)
// Fast SIMD implementation of CRC-32C for x86 with SSE 4.2
uint32_t crc32c_hw(const uint8_t *data, size_t nbytes,
// Fast SIMD implementation of CRC-32C for x86 with SSE 4.2
uint32_t crc32c_hw(const uint8_t *data, size_t nbytes,