X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/8276a9c565bc29afbc6cc120dfde0801c06c2bbd..a1a9ee0a7240087e202a7855e470573de0e59c09:/math/mpmont.c diff --git a/math/mpmont.c b/math/mpmont.c index f8a26119..2ed1e113 100644 --- a/math/mpmont.c +++ b/math/mpmont.c @@ -90,19 +90,25 @@ static void simple_redccore(mpw *dv, mpw *dvl, const mpw *mv, #if CPUFAM_X86 MAYBE_REDC4(x86_sse2) + MAYBE_REDC4(x86_avx) #endif #if CPUFAM_AMD64 MAYBE_REDC4(amd64_sse2) + MAYBE_REDC4(amd64_avx) #endif static redccore__functype *pick_redccore(void) { #if CPUFAM_X86 + DISPATCH_PICK_COND(mpmont_reduce, maybe_redc4_x86_avx, + cpu_feature_p(CPUFEAT_X86_AVX)); DISPATCH_PICK_COND(mpmont_reduce, maybe_redc4_x86_sse2, cpu_feature_p(CPUFEAT_X86_SSE2)); #endif #if CPUFAM_AMD64 + DISPATCH_PICK_COND(mpmont_reduce, maybe_redc4_amd64_avx, + cpu_feature_p(CPUFEAT_X86_AVX)); DISPATCH_PICK_COND(mpmont_reduce, maybe_redc4_amd64_sse2, cpu_feature_p(CPUFEAT_X86_SSE2)); #endif @@ -190,19 +196,25 @@ static void simple_mulcore(mpw *dv, mpw *dvl, #if CPUFAM_X86 MAYBE_MUL4(x86_sse2) + MAYBE_MUL4(x86_avx) #endif #if CPUFAM_AMD64 MAYBE_MUL4(amd64_sse2) + MAYBE_MUL4(amd64_avx) #endif static mulcore__functype *pick_mulcore(void) { #if CPUFAM_X86 + DISPATCH_PICK_COND(mpmont_mul, maybe_mul4_x86_avx, + cpu_feature_p(CPUFEAT_X86_AVX)); DISPATCH_PICK_COND(mpmont_mul, maybe_mul4_x86_sse2, cpu_feature_p(CPUFEAT_X86_SSE2)); #endif #if CPUFAM_AMD64 + DISPATCH_PICK_COND(mpmont_mul, maybe_mul4_amd64_avx, + cpu_feature_p(CPUFEAT_X86_AVX)); DISPATCH_PICK_COND(mpmont_mul, maybe_mul4_amd64_sse2, cpu_feature_p(CPUFEAT_X86_SSE2)); #endif @@ -432,6 +444,10 @@ mp *mpmont_mul(const mpmont *mm, mp *d, mp *a, mp *b) #ifdef TEST_RIG +#ifdef ENABLE_ASM_DEBUG +# include "regdump.h" +#endif + static int tcreate(dstr *v) { mp *m = *(mp **)v[0].buf; @@ -527,7 +543,6 @@ static int tmul(dstr *v) mp_drop(mr); } - MP_DROP(m); MP_DROP(a); MP_DROP(b); @@ -546,6 +561,9 @@ static test_chunk tests[] = { int main(int argc, char *argv[]) { sub_init(); +#ifdef ENABLE_ASM_DEBUG + regdump_init(); +#endif test_run(argc, argv, tests, SRCDIR "/t/mpmont"); return (0); }