diff options
author | costan <costan@google.com> | 2017-03-01 10:57:52 -0800 |
---|---|---|
committer | Chris Mumford <cmumford@chromium.org> | 2017-03-01 11:37:43 -0800 |
commit | eb4f0972fdb5c2754c95fae198443a552a88d0b7 (patch) | |
tree | d96d1ee482f5e2e5396f71aa1cce428929f748ce /port | |
parent | d0883b6006f92534dbcbea9268cb7a3cf9a13ccd (diff) | |
download | leveldb-eb4f0972fdb5c2754c95fae198443a552a88d0b7.tar.gz |
leveldb: Fix compilation warnings in port_posix_sse.cc on x86 (32-bit).
LE_LOAD64 is only used when _mm_crc32_u64 is available, on 64-bit x86 processors.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148906169
Diffstat (limited to 'port')
-rw-r--r-- | port/port_posix_sse.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/port/port_posix_sse.cc b/port/port_posix_sse.cc index 57ec8fe..1e519ba 100644 --- a/port/port_posix_sse.cc +++ b/port/port_posix_sse.cc @@ -37,6 +37,8 @@ static inline uint32_t LE_LOAD32(const uint8_t *p) { return word; } +#if defined(_M_X64) || defined(__x86_64__) // LE_LOAD64 is only used on x64. + // Used to fetch a naturally-aligned 64-bit word in little endian byte-order static inline uint64_t LE_LOAD64(const uint8_t *p) { uint64_t dword; @@ -44,6 +46,8 @@ static inline uint64_t LE_LOAD64(const uint8_t *p) { return dword; } +#endif // defined(_M_X64) || defined(__x86_64__) + static inline bool HaveSSE42() { #if defined(_MSC_VER) int cpu_info[4]; |