fix compilation on arm64

This commit is contained in:
R4SAS 2020-11-10 21:55:42 +00:00
parent 6f91e3988c
commit f588af834d
3 changed files with 17 additions and 21 deletions

View file

@ -825,13 +825,12 @@ namespace data
return key;
}
#if defined(__x86_64__) || defined(__i386__)
#pragma GCC push_options
#pragma GCC target("avx")
#endif
XORMetric operator^(const IdentHash& key1, const IdentHash& key2)
{
XORMetric m;
#if defined(__x86_64__) || defined(__i386__)
#pragma GCC push_options
#pragma GCC target("avx")
if(i2p::cpu::avx)
{
__asm__
@ -846,6 +845,8 @@ namespace data
);
}
else
#pragma GCC pop_options
#endif
{
const uint64_t * hash1 = key1.GetLL (), * hash2 = key2.GetLL ();
m.metric_ll[0] = hash1[0] ^ hash2[0];
@ -856,9 +857,5 @@ namespace data
return m;
}
#if defined(__x86_64__) || defined(__i386__)
#pragma GCC pop_options
#endif
}
}