diff options
author | Werner Koch <wk@gnupg.org> | 2003-12-19 11:44:33 +0000 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2003-12-19 11:44:33 +0000 |
commit | dafa44fdd87e48ce6762eb29d6bee5affe538cf1 (patch) | |
tree | df4a1c1e7816c3381121bfae84eecf1f886cd961 /mpi/generic/mpih-mul2.c | |
parent | 0a4eb6a4c9cb42136ec2d9c216e0df4b3cf9f28f (diff) | |
download | libgcrypt-dafa44fdd87e48ce6762eb29d6bee5affe538cf1.tar.gz |
Added Manifest files.
Diffstat (limited to 'mpi/generic/mpih-mul2.c')
-rw-r--r-- | mpi/generic/mpih-mul2.c | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/mpi/generic/mpih-mul2.c b/mpi/generic/mpih-mul2.c index e43151e8..3b754960 100644 --- a/mpi/generic/mpih-mul2.c +++ b/mpi/generic/mpih-mul2.c @@ -1,4 +1,4 @@ -/* mpihelp-mul_2.c - MPI helper functions +/* mpih-mul2.c - MPI helper functions * Copyright (C) 1994, 1996, 1997, 1998, 2001, * 2002 Free Software Foundation, Inc. * @@ -36,30 +36,33 @@ mpi_limb_t _gcry_mpih_addmul_1( mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, mpi_size_t s1_size, mpi_limb_t s2_limb) { - mpi_limb_t cy_limb; - mpi_size_t j; - mpi_limb_t prod_high, prod_low; - mpi_limb_t x; + mpi_limb_t cy_limb; + mpi_size_t j; + mpi_limb_t prod_high, prod_low; + mpi_limb_t x; - /* The loop counter and index J goes from -SIZE to -1. This way - * the loop becomes faster. */ - j = -s1_size; - res_ptr -= j; - s1_ptr -= j; + /* The loop counter and index J goes from -SIZE to -1. This way + * the loop becomes faster. */ + j = -s1_size; + res_ptr -= j; + s1_ptr -= j; - cy_limb = 0; - do { - umul_ppmm( prod_high, prod_low, s1_ptr[j], s2_limb ); + cy_limb = 0; + do + { + umul_ppmm( prod_high, prod_low, s1_ptr[j], s2_limb ); - prod_low += cy_limb; - cy_limb = (prod_low < cy_limb?1:0) + prod_high; + prod_low += cy_limb; + cy_limb = (prod_low < cy_limb?1:0) + prod_high; - x = res_ptr[j]; - prod_low = x + prod_low; - cy_limb += prod_low < x?1:0; - res_ptr[j] = prod_low; - } while ( ++j ); - return cy_limb; + x = res_ptr[j]; + prod_low = x + prod_low; + cy_limb += prod_low < x?1:0; + res_ptr[j] = prod_low; + } + while ( ++j ); + + return cy_limb; } |