From 520fec686dffb2c717b32f56db3e6715b1b37b00 Mon Sep 17 00:00:00 2001 From: jasonmoxham Date: Fri, 2 Oct 2009 02:57:31 +0000 Subject: [PATCH] tweek mod_1_1 amd asm to full speed --- mpn/x86_64/k8/mod_1_1.asm | 4 ++-- tune/tuneup.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mpn/x86_64/k8/mod_1_1.asm b/mpn/x86_64/k8/mod_1_1.asm index 3bbf975b..4ab36990 100644 --- a/mpn/x86_64/k8/mod_1_1.asm +++ b/mpn/x86_64/k8/mod_1_1.asm @@ -36,10 +36,10 @@ mov %rdx,%rcx sub $2,%rcx ALIGN(16) lp: - mov $0,%r11 - mul %r8 mov -8(%rsi,%rcx,8),%r10 + mul %r8 add %rax,%r10 + mov $0,%r11 adc %rdx,%r11 mov %r13,%rax mul %r9 diff --git a/tune/tuneup.c b/tune/tuneup.c index 17844744..7e834743 100644 --- a/tune/tuneup.c +++ b/tune/tuneup.c @@ -970,12 +970,12 @@ void tune_mod_1_k (gmp_randstate_t rands) one (&mod_1_1_threshold, rands, ¶m); param.name = "MOD_1_2_THRESHOLD"; - param.min_size = mod_1_1_threshold; + param.min_size = MAX(mod_1_1_threshold,4); //param.max_size = 1000; one (&mod_1_2_threshold, rands, ¶m); param.name = "MOD_1_3_THRESHOLD"; - param.min_size = mod_1_2_threshold; + param.min_size = MAX(mod_1_2_threshold,5); //param.max_size = 10000; one (&mod_1_3_threshold, rands, ¶m);