X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/cd303963aec7291de8aabf9aa04d1423fe7dcac4..ea1b3cec199052eda3a0054d86c70e948c6e7580:/math/mpmont.c diff --git a/math/mpmont.c b/math/mpmont.c index 3edb58fb..6109c856 100644 --- a/math/mpmont.c +++ b/math/mpmont.c @@ -98,6 +98,14 @@ static void simple_redccore(mpw *dv, mpw *dvl, const mpw *mv, MAYBE_REDC4(amd64_avx) #endif +#if CPUFAM_ARMEL + MAYBE_REDC4(arm_neon) +#endif + +#if CPUFAM_ARM64 + MAYBE_REDC4(arm64_simd) +#endif + static redccore__functype *pick_redccore(void) { #if CPUFAM_X86 @@ -112,6 +120,13 @@ static redccore__functype *pick_redccore(void) DISPATCH_PICK_COND(mpmont_reduce, maybe_redc4_amd64_sse2, cpu_feature_p(CPUFEAT_X86_SSE2)); #endif +#if CPUFAM_ARMEL + DISPATCH_PICK_COND(mpmont_reduce, maybe_redc4_arm_neon, + cpu_feature_p(CPUFEAT_ARM_NEON)); +#endif +#if CPUFAM_ARM64 + DISPATCH_PICK_COND(mpmont_reduce, maybe_redc4_arm64_simd, 1); +#endif DISPATCH_PICK_FALLBACK(mpmont_reduce, simple_redccore); } @@ -204,6 +219,14 @@ static void simple_mulcore(mpw *dv, mpw *dvl, MAYBE_MUL4(amd64_avx) #endif +#if CPUFAM_ARMEL + MAYBE_MUL4(arm_neon) +#endif + +#if CPUFAM_ARM64 + MAYBE_MUL4(arm64_simd) +#endif + static mulcore__functype *pick_mulcore(void) { #if CPUFAM_X86 @@ -218,6 +241,13 @@ static mulcore__functype *pick_mulcore(void) DISPATCH_PICK_COND(mpmont_mul, maybe_mul4_amd64_sse2, cpu_feature_p(CPUFEAT_X86_SSE2)); #endif +#if CPUFAM_ARMEL + DISPATCH_PICK_COND(mpmont_mul, maybe_mul4_arm_neon, + cpu_feature_p(CPUFEAT_ARM_NEON)); +#endif +#if CPUFAM_ARM64 + DISPATCH_PICK_COND(mpmont_mul, maybe_mul4_arm64_simd, 1); +#endif DISPATCH_PICK_FALLBACK(mpmont_mul, simple_mulcore); }