suppress USE_AVX, make it autodetectable on runtime

Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
R4SAS 2020-11-10 20:57:22 +03:00
parent 7e874eaa7c
commit 07ff165a8f
10 changed files with 17 additions and 41 deletions

View file

@ -825,10 +825,12 @@ namespace data
return key;
}
#if defined(__x86_64__) || defined(__i386__)
#pragma GCC target("avx")
#endif
XORMetric operator^(const IdentHash& key1, const IdentHash& key2)
{
XORMetric m;
#ifdef __AVX__
if(i2p::cpu::avx)
{
__asm__
@ -843,7 +845,6 @@ namespace data
);
}
else
#endif
{
const uint64_t * hash1 = key1.GetLL (), * hash2 = key2.GetLL ();
m.metric_ll[0] = hash1[0] ^ hash2[0];