Browse Source

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
naive_version
costan 7 years ago
committed by Chris Mumford
parent
commit
eb4f0972fd
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      port/port_posix_sse.cc

+ 4
- 0
port/port_posix_sse.cc View File

@ -37,6 +37,8 @@ static inline uint32_t LE_LOAD32(const uint8_t *p) {
return word; 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 // Used to fetch a naturally-aligned 64-bit word in little endian byte-order
static inline uint64_t LE_LOAD64(const uint8_t *p) { static inline uint64_t LE_LOAD64(const uint8_t *p) {
uint64_t dword; uint64_t dword;
@ -44,6 +46,8 @@ static inline uint64_t LE_LOAD64(const uint8_t *p) {
return dword; return dword;
} }
#endif // defined(_M_X64) || defined(__x86_64__)
static inline bool HaveSSE42() { static inline bool HaveSSE42() {
#if defined(_MSC_VER) #if defined(_MSC_VER)
int cpu_info[4]; int cpu_info[4];

Loading…
Cancel
Save