don't attempt to use BMI2 on x86-32
This commit is contained in:
parent
72e46f24bd
commit
3ed6241609
@ -40,7 +40,7 @@
|
||||
#include "../builtins.h"
|
||||
#include "../utils/calls.h"
|
||||
|
||||
#ifdef __BMI2__
|
||||
#if __BMI2__ && __x86_64__
|
||||
#if !SLOW_PDEP
|
||||
#define FAST_PDEP 1
|
||||
#endif
|
||||
@ -198,7 +198,7 @@ static Arr* transpose_noshape(B* px, usz ia, usz w, usz h) {
|
||||
Arr* x1o = TI(x,slice)(incG(x),w,w);
|
||||
interleave_bits(rp, bitany_ptr(x), bitanyv_ptr(x1o), ia);
|
||||
mm_free((Value*)x1o);
|
||||
#ifdef __BMI2__
|
||||
#if __BMI2__ && __x86_64__
|
||||
} else if (w==2) {
|
||||
u64* xp = bitany_ptr(x);
|
||||
u64* r0; r=m_bitarrp(&r0, ia);
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
INIT_GLOBAL BitSelFn* bitselFns = bitselFnsRaw;
|
||||
#endif
|
||||
|
||||
#if defined(__BMI2__) && !SLOW_PDEP
|
||||
#if __BMI2__ && __x86_64__ && !SLOW_PDEP
|
||||
#define FAST_PDEP 1
|
||||
#include <immintrin.h>
|
||||
#endif
|
||||
|
||||
@ -114,7 +114,7 @@ static inline uint64_t _wyr4(const uint8_t *p) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __BMI2__
|
||||
#if __BMI2__ && __x86_64__
|
||||
#include <x86intrin.h>
|
||||
#endif
|
||||
|
||||
@ -122,7 +122,7 @@ static inline uint64_t _wyr4(const uint8_t *p) {
|
||||
FORCE_INLINE uint64_t wyhash(const void *key, size_t len, uint64_t seed, const uint64_t *secret){
|
||||
const uint8_t *p = (const uint8_t *)key; seed^=*secret; uint64_t a, b;
|
||||
if (_likely_(len<=16)) {
|
||||
#ifdef __BMI2__
|
||||
#if __BMI2__ && __x86_64__
|
||||
if (len>8) { a = _wyr8(p); b = _bzhi_u64(_wyr8(p+8), (len-8)*8); }
|
||||
else { a = 0; b = _bzhi_u64(_wyr8(p ), len *8); }
|
||||
#else
|
||||
|
||||
2
src/vm.h
2
src/vm.h
@ -4,7 +4,7 @@
|
||||
#endif
|
||||
|
||||
#if defined(JIT_ENABLED)? JIT_ENABLED : ( \
|
||||
(defined(__x86_64) || defined(__amd64__)) \
|
||||
defined(__x86_64__) \
|
||||
&& (__APPLE__ || __MACH__ || __linux__ || __FreeBSD__ || __unix || __unix__) \
|
||||
&& (defined(__linux__)? defined(MAP_FIXED_NOREPLACE) : 1) \
|
||||
&& defined(MAP_32BIT) && MM!=0 \
|
||||
|
||||
Loading…
Reference in New Issue
Block a user