Skip to content

Commit

Permalink
Fix compiler warnings on 32bits
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyichao committed Aug 18, 2016
1 parent 1af5356 commit e711097
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/llvm-ptls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ void LowerPTLS::runOnFunction(LLVMContext &ctx, Module &M, Function *F,
Value *tls = nullptr;
assert(0 && "Cannot emit thread pointer for this architecture.");
# endif
(void)T_pint8;
ptlsStates->replaceAllUsesWith(tls);
ptlsStates->eraseFromParent();
}
Expand Down
14 changes: 12 additions & 2 deletions src/support/hashing.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
#ifndef HASHING_H
#define HASHING_H

#include "utils.h"
#include "dtypes.h"

#ifdef __cplusplus
extern "C" {
#endif
Expand All @@ -22,10 +25,17 @@ JL_DLLEXPORT uint32_t memhash32(const char *buf, size_t n);
JL_DLLEXPORT uint32_t memhash32_seed(const char *buf, size_t n, uint32_t seed);

#ifdef _P64
#define bitmix(a,b) int64hash((a)^bswap_64(b))
STATIC_INLINE uint64_t bitmix(uint64_t a, uint64_t b)
{
return int64hash(a^bswap_64(b));
}
#else
#define bitmix(a,b) int64to32hash((((uint64_t)a)<<32)|((uint64_t)b))
STATIC_INLINE uint32_t bitmix(uint32_t a, uint32_t b)
{
return int64to32hash((((uint64_t)a) << 32) | (uint64_t)b);
}
#endif
#define bitmix(a, b) (bitmix)((uintptr_t)(a), (uintptr_t)(b))

#ifdef __cplusplus
}
Expand Down

0 comments on commit e711097

Please sign in to comment.