From 0bf44b072ca648336bca9cf1ec24ea9d257cea9a Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 17 Jul 2000 14:32:21 +0000 Subject: See ChangeLog: Mon Jul 17 16:35:47 CEST 2000 Werner Koch --- mpi/longlong.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'mpi/longlong.h') 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__ */ -- cgit v1.2.3