diff options
Diffstat (limited to 'mpi')
-rw-r--r-- | mpi/ChangeLog | 9 | ||||
-rw-r--r-- | mpi/config.links | 8 | ||||
-rw-r--r-- | mpi/longlong.h | 14 | ||||
-rw-r--r-- | mpi/mpih-mul.c | 2 |
4 files changed, 28 insertions, 5 deletions
diff --git a/mpi/ChangeLog b/mpi/ChangeLog index 7ef20de40..393eda8c1 100644 --- a/mpi/ChangeLog +++ b/mpi/ChangeLog @@ -1,3 +1,12 @@ +Tue Mar 7 18:45:31 CET 2000 Werner Koch <[email protected]> + + * mpih-mul.c (mpihelp_mul_karatsuba_case): It seems that the + untested part works fine. Removed the debugging message. + + * longlong.h (umul_ppmm): Fixes for ARM-4. By Sean MacLennan. + + * config.links: Add support for NetBSD. + Thu Jan 13 19:31:58 CET 2000 Werner Koch <[email protected]> * mpi-internal.h (karatsuba_ctx): New. diff --git a/mpi/config.links b/mpi/config.links index 73bed01bb..96cfeba29 100644 --- a/mpi/config.links +++ b/mpi/config.links @@ -1,4 +1,4 @@ -# sourced my ../configure to get the list of files to link +# sourced by ../configure to get the list of files to link # this should set $mpi_ln_src and mpi_ln_dst. # Note: this is called from the above directory. @@ -12,12 +12,14 @@ echo '/* created by config.links - do not edit */' >./mpi/asm-syntax.h if test "$try_asm_modules" = "yes" ; then case "${target}" in - i[34]86*-*-freebsd*-elf | i[34]86*-*-freebsd[34]* | i[34]86*-*-freebsdelf*) + i[34]86*-*-freebsd*-elf | i[34]86*-*-freebsd[34]* | i[34]86*-*-freebsdelf* \ + | i[34]86*-*-netbsd* ) echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h path="i386" ;; - i[56]86*-*-freebsd*-elf | i[56]86*-*-freebsd[34]* | i[56]86*-*-freebsdelf*) + i[56]86*-*-freebsd*-elf | i[56]86*-*-freebsd[34]* | i[56]86*-*-freebsdelf* \ + | i[56]86*-*-netbsd* | pentium-*-netbsd* | pentiumpro-*-netbsd*) echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h path="i586 i386" diff --git a/mpi/longlong.h b/mpi/longlong.h index c92435570..e36beae49 100644 --- a/mpi/longlong.h +++ b/mpi/longlong.h @@ -199,6 +199,8 @@ extern UDItype __udiv_qrnnd (); "rI" ((USItype)(bh)), \ "r" ((USItype)(al)), \ "rI" ((USItype)(bl))) +#ifdef __ARM_ARCH_3__ +/* SAM This does not work on arm4 */ #define umul_ppmm(xh, xl, a, b) \ __asm__ ("%@ Inlined umul_ppmm mov %|r0, %2, lsr #16 @@ -218,6 +220,18 @@ extern UDItype __udiv_qrnnd (); : "r" ((USItype)(a)), \ "r" ((USItype)(b)) \ : "r0", "r1", "r2") +#elif __ARM_ARCH_4__ +#define umul_ppmm(xh, xl, a, b) \ + __asm__ ("%@ Inlined umul_ppmm + umull %r1, %r0, %r2, %r3" \ + : "=&r" ((USItype)(xh)), \ + "=r" ((USItype)(xl)) \ + : "r" ((USItype)(a)), \ + "r" ((USItype)(b)) \ + : "r0", "r1") +#else +#error Untested architecture +#endif #define UMUL_TIME 20 #define UDIV_TIME 100 #endif /* __arm__ */ diff --git a/mpi/mpih-mul.c b/mpi/mpih-mul.c index 3422f6541..e1bfef55b 100644 --- a/mpi/mpih-mul.c +++ b/mpi/mpih-mul.c @@ -415,8 +415,6 @@ mpihelp_mul_karatsuba_case( mpi_ptr_t prodp, } if( usize ) { - #warning Must test this CODE!!! - g10_log_debug("this code path is not yet tested\n"); if( usize < KARATSUBA_THRESHOLD ) { mpihelp_mul( ctx->tspace, vp, vsize, up, usize ); } |