diff options
author | Werner Koch <wk@gnupg.org> | 2001-05-28 21:12:27 +0000 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2001-05-28 21:12:27 +0000 |
commit | 08e3fbb986bed2f39cc5dca806faca9654c3a6df (patch) | |
tree | 8ff245903939d951c51b2c49b312074b91e94536 /mpi/longlong.h | |
parent | 7e68abda362fce76e91631973d062fd7c8ff5e4e (diff) | |
download | libgcrypt-08e3fbb986bed2f39cc5dca806faca9654c3a6df.tar.gz |
Merged back some changes fron gnupg. Fixed doc building.
Diffstat (limited to 'mpi/longlong.h')
-rw-r--r-- | mpi/longlong.h | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/mpi/longlong.h b/mpi/longlong.h index e36beae4..84020773 100644 --- a/mpi/longlong.h +++ b/mpi/longlong.h @@ -1,7 +1,8 @@ /* longlong.h -- definitions for mixed size 32/64 bit arithmetic. - Note: I added some stuff for use with g10 + Note: I added some stuff for use with gnupg -Copyright (C) 1991, 1992, 1993, 1994, 1996 Free Software Foundation, Inc. +Copyright (C) 1991, 1992, 1993, 1994, 1996, 1998, + 2000, 2001 Free Software Foundation, Inc. This file is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by @@ -199,28 +200,27 @@ extern UDItype __udiv_qrnnd (); "rI" ((USItype)(bh)), \ "r" ((USItype)(al)), \ "rI" ((USItype)(bl))) -#ifdef __ARM_ARCH_3__ -/* SAM This does not work on arm4 */ +#if defined __ARM_ARCH_2__ || defined __ARM_ARCH_3__ #define umul_ppmm(xh, xl, a, b) \ __asm__ ("%@ Inlined umul_ppmm - mov %|r0, %2, lsr #16 - mov %|r2, %3, lsr #16 - bic %|r1, %2, %|r0, lsl #16 - bic %|r2, %3, %|r2, lsl #16 - mul %1, %|r1, %|r2 - mul %|r2, %|r0, %|r2 - mul %|r1, %0, %|r1 - mul %0, %|r0, %0 - adds %|r1, %|r2, %|r1 - addcs %0, %0, #65536 - adds %1, %1, %|r1, lsl #16 - adc %0, %0, %|r1, lsr #16" \ + mov %|r0, %2, lsr #16 @ AAAA + mov %|r2, %3, lsr #16 @ BBBB + bic %|r1, %2, %|r0, lsl #16 @ aaaa + bic %0, %3, %|r2, lsl #16 @ bbbb + mul %1, %|r1, %|r2 @ aaaa * BBBB + mul %|r2, %|r0, %|r2 @ AAAA * BBBB + mul %|r1, %0, %|r1 @ aaaa * bbbb + mul %0, %|r0, %0 @ AAAA * bbbb + adds %|r0, %1, %0 @ central sum + addcs %|r2, %|r2, #65536 + adds %1, %|r1, %|r0, lsl #16 + adc %0, %|r2, %|r0, lsr #16" \ : "=&r" ((USItype)(xh)), \ "=r" ((USItype)(xl)) \ : "r" ((USItype)(a)), \ "r" ((USItype)(b)) \ : "r0", "r1", "r2") -#elif __ARM_ARCH_4__ +#else #define umul_ppmm(xh, xl, a, b) \ __asm__ ("%@ Inlined umul_ppmm umull %r1, %r0, %r2, %r3" \ @@ -229,8 +229,6 @@ extern UDItype __udiv_qrnnd (); : "r" ((USItype)(a)), \ "r" ((USItype)(b)) \ : "r0", "r1") -#else -#error Untested architecture #endif #define UMUL_TIME 20 #define UDIV_TIME 100 |