Do not try to use VMULL in Android/ARM.

This commit is contained in:
2021-10-13 05:15:57 +01:00
parent a46fc69241
commit 8e2a9364a7

View File

@@ -32,7 +32,7 @@
#include "arm_vmull.h" #include "arm_vmull.h"
#include "simd.h" #include "simd.h"
#if !defined(_WIN32) #if !defined(_WIN32) && (!defined(__ANDROID__) || !defined(__arm__))
TARGET_WITH_CRYPTO static uint64x2_t sse2neon_vmull_p64_crypto(uint64x1_t _a, uint64x1_t _b) TARGET_WITH_CRYPTO static uint64x2_t sse2neon_vmull_p64_crypto(uint64x1_t _a, uint64x1_t _b)
{ {
poly64_t a = vget_lane_p64(vreinterpret_p64_u64(_a), 0); poly64_t a = vget_lane_p64(vreinterpret_p64_u64(_a), 0);
@@ -43,7 +43,7 @@ TARGET_WITH_CRYPTO static uint64x2_t sse2neon_vmull_p64_crypto(uint64x1_t _a, ui
TARGET_WITH_SIMD uint64x2_t sse2neon_vmull_p64(uint64x1_t _a, uint64x1_t _b) TARGET_WITH_SIMD uint64x2_t sse2neon_vmull_p64(uint64x1_t _a, uint64x1_t _b)
{ {
#if !defined(_WIN32) #if !defined(_WIN32) && (!defined(__ANDROID__) || !defined(__arm__))
// Wraps vmull_p64 // Wraps vmull_p64
if(have_arm_crypto()) return sse2neon_vmull_p64_crypto(_a, _b); if(have_arm_crypto()) return sse2neon_vmull_p64_crypto(_a, _b);
#endif #endif
@@ -163,4 +163,4 @@ TARGET_WITH_SIMD uint64x2_t mm_slli_si128(uint64x2_t a, int imm)
return vreinterpretq_u64_u8(vld1q_u8(((uint8_t const*)tmp) + (16 - imm))); return vreinterpretq_u64_u8(vld1q_u8(((uint8_t const*)tmp) + (16 - imm)));
} }
#endif #endif