From dafa44fdd87e48ce6762eb29d6bee5affe538cf1 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 19 Dec 2003 11:44:33 +0000 Subject: Added Manifest files. --- mpi/generic/Manifest | 29 +++++++++++++++++++++++++++++ mpi/generic/distfiles | 1 + mpi/generic/mpih-add1.c | 46 ++++++++++++++++++++++++---------------------- mpi/generic/mpih-lshift.c | 37 +++++++++++++++++++------------------ mpi/generic/mpih-mul1.c | 36 +++++++++++++++++++----------------- mpi/generic/mpih-mul2.c | 45 ++++++++++++++++++++++++--------------------- mpi/generic/mpih-mul3.c | 44 +++++++++++++++++++++++--------------------- mpi/generic/mpih-rshift.c | 33 +++++++++++++++++---------------- mpi/generic/mpih-sub1.c | 42 ++++++++++++++++++++++-------------------- mpi/generic/udiv-w-sdiv.c | 4 ++-- 10 files changed, 180 insertions(+), 137 deletions(-) create mode 100644 mpi/generic/Manifest (limited to 'mpi/generic') diff --git a/mpi/generic/Manifest b/mpi/generic/Manifest new file mode 100644 index 00000000..c429fde7 --- /dev/null +++ b/mpi/generic/Manifest @@ -0,0 +1,29 @@ +# Manifest - checksums +# Copyright 2003 Free Software Foundation, Inc. +# +# This file is part of Libgcrypt. +# +# Libgcrypt is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser general Public License as +# published by the Free Software Foundation; either version 2.1 of +# the License, or (at your option) any later version. +# +# Libgcrypt is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + +mpih-add1.c iQCVAwUAP+Lj2DEAnp832S/7AQKn/AQAwQLWggl6zNQ5EZ+lE+jKV8W3FsogW3/6tp9T5rrSR5JnlWyoHQ9/Pu4knOcLjS6nIfVOiAEifu3nuIysQr9jDSSSJA2L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G3aOGBKg2a7bY5Q5RUho3hUWb9UsVYVUfXLf7IOTt/3a6MLh2CmV5dFPWJmSlbCyQRcn6n/fLDeJ3A2bWTS/BhqGfpOXUIU1ws==jCf8 +mpih-sub1.c iQCVAwUAP+LlZzEAnp832S/7AQIEPgP/dLHTDRbPrYJhsLp9SjGstU1M8/IC5XytcDtO3NQeu4mx6vaXjpujtsTvKIbX4QL5IahNntVVKv1xFLEm2yFg7L2ns0uD/mfwGgOhCG1j2o/SaTAWP5KxP7ae5UDcZl2w6NWvEuMj9t32zmziAZjP8W73A37FUspeRDYiL9sQzkI==QQzk +udiv-w-sdiv.c iQCVAwUAP+Lk0TEAnp832S/7AQICXAQAsxe1SQD4+xZaZTqBC0V9Cyuo0mrdccnRFzthOtm0ARwKFXU2cuLW/ZBOkmeWOVmOFhBp22/I8dEGYnMA3gcfmOMCpNu9i9zk/XHfptdunA1MnOe3GsoWgfHL0rhpAyPhp/X043ICB41NElnnuxADuQQlD4Z1fca5ygYxMr2crJg==EI/6 +mpi-asm-defs.h iQCVAwUAP+LkgDEAnp832S/7AQK0FgQAxJZ7xvXhoZa33GWe23LRb3asrno/loZSyAIXrntqtVH8M3pEsCY0OyW4ry4hX2RnxpuhRCM/PdRNLG3xXyMSVIhkHU8WVRLqzF2LLjEkyU3cAmHnnTQ9aO/XpUWtJGTZ8q2bv7ZsAEi4aPl0p6KhPXcPgM9vQ2XcyOPn3Dl0d6Q==xpjI +$names$ iQCVAwUAP+LmNDEAnp832S/7AQJa+gP+KQNJpbNOgc+s2UX+Ya2gDaOFcAROImIllhg3ej8EaBF8xxdHmWT1zaKwTwi3moEEleykMR104YAGWyQeMbFYiuPPBW+ohrT6KxRBVJpIA9auOOqqJMyglZyoR3Hv7gduVYUW1h/DebnqiKXKEfzQDFqYuT0ayuteoOR4B5NICbE==nLSh diff --git a/mpi/generic/distfiles b/mpi/generic/distfiles index 649e829b..9810eef4 100644 --- a/mpi/generic/distfiles +++ b/mpi/generic/distfiles @@ -1,3 +1,4 @@ +Manifest mpih-add1.c mpih-mul1.c mpih-mul2.c diff --git a/mpi/generic/mpih-add1.c b/mpi/generic/mpih-add1.c index 5afd50cd..4a84df64 100644 --- a/mpi/generic/mpih-add1.c +++ b/mpi/generic/mpih-add1.c @@ -32,32 +32,34 @@ #include "longlong.h" mpi_limb_t -_gcry_mpih_add_n( mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, - mpi_ptr_t s2_ptr, mpi_size_t size) +_gcry_mpih_add_n (mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, + mpi_ptr_t s2_ptr, mpi_size_t size) { - mpi_limb_t x, y, cy; - mpi_size_t j; + mpi_limb_t x, y, cy; + mpi_size_t j; - /* The loop counter and index J goes from -SIZE to -1. This way - the loop becomes faster. */ - j = -size; + /* The loop counter and index J goes from -SIZE to -1. This way + the loop becomes faster. */ + j = -size; - /* Offset the base pointers to compensate for the negative indices. */ - s1_ptr -= j; - s2_ptr -= j; - res_ptr -= j; + /* Offset the base pointers to compensate for the negative indices. */ + s1_ptr -= j; + s2_ptr -= j; + res_ptr -= j; - cy = 0; - do { - y = s2_ptr[j]; - x = s1_ptr[j]; - y += cy; /* add previous carry to one addend */ - cy = y < cy; /* get out carry from that addition */ - y += x; /* add other addend */ - cy += y < x; /* get out carry from that add, combine */ - res_ptr[j] = y; - } while( ++j ); + cy = 0; + do + { + y = s2_ptr[j]; + x = s1_ptr[j]; + y += cy; /* add previous carry to one addend */ + cy = y < cy; /* get out carry from that addition */ + y += x; /* add other addend */ + cy += y < x; /* get out carry from that add, combine */ + res_ptr[j] = y; + } + while ( ++j ); - return cy; + return cy; } diff --git a/mpi/generic/mpih-lshift.c b/mpi/generic/mpih-lshift.c index e31f1937..f48c12cd 100644 --- a/mpi/generic/mpih-lshift.c +++ b/mpi/generic/mpih-lshift.c @@ -1,4 +1,4 @@ -/* mpihelp-lshift.c - MPI helper functions +/* mpi-lshift.c - MPI helper functions * Copyright (C) 1994, 1996, 1998, 2001, 2002 Free Software Foundation, Inc. * * This file is part of Libgcrypt. @@ -42,26 +42,27 @@ mpi_limb_t _gcry_mpih_lshift( mpi_ptr_t wp, mpi_ptr_t up, mpi_size_t usize, unsigned int cnt) { - mpi_limb_t high_limb, low_limb; - unsigned sh_1, sh_2; - mpi_size_t i; - mpi_limb_t retval; + mpi_limb_t high_limb, low_limb; + unsigned sh_1, sh_2; + mpi_size_t i; + mpi_limb_t retval; - sh_1 = cnt; - wp += 1; - sh_2 = BITS_PER_MPI_LIMB - sh_1; - i = usize - 1; - low_limb = up[i]; - retval = low_limb >> sh_2; - high_limb = low_limb; - while( --i >= 0 ) { - low_limb = up[i]; - wp[i] = (high_limb << sh_1) | (low_limb >> sh_2); - high_limb = low_limb; + sh_1 = cnt; + wp += 1; + sh_2 = BITS_PER_MPI_LIMB - sh_1; + i = usize - 1; + low_limb = up[i]; + retval = low_limb >> sh_2; + high_limb = low_limb; + while ( --i >= 0 ) + { + low_limb = up[i]; + wp[i] = (high_limb << sh_1) | (low_limb >> sh_2); + high_limb = low_limb; } - wp[i] = high_limb << sh_1; + wp[i] = high_limb << sh_1; - return retval; + return retval; } diff --git a/mpi/generic/mpih-mul1.c b/mpi/generic/mpih-mul1.c index 9ab57ff9..0e8197d8 100644 --- a/mpi/generic/mpih-mul1.c +++ b/mpi/generic/mpih-mul1.c @@ -35,26 +35,28 @@ mpi_limb_t _gcry_mpih_mul_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 cy_limb; + mpi_size_t j; + mpi_limb_t prod_high, prod_low; - /* The loop counter and index J goes from -S1_SIZE to -1. This way - * the loop becomes faster. */ - j = -s1_size; + /* The loop counter and index J goes from -S1_SIZE to -1. This way + * the loop becomes faster. */ + j = -s1_size; - /* Offset the base pointers to compensate for the negative indices. */ - s1_ptr -= j; - res_ptr -= j; + /* Offset the base pointers to compensate for the negative indices. */ + s1_ptr -= j; + res_ptr -= j; - 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; - res_ptr[j] = prod_low; - } while( ++j ); + 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; + res_ptr[j] = prod_low; + } + while( ++j ); - return cy_limb; + return cy_limb; } 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; } diff --git a/mpi/generic/mpih-mul3.c b/mpi/generic/mpih-mul3.c index 65f7a751..5e84f94f 100644 --- a/mpi/generic/mpih-mul3.c +++ b/mpi/generic/mpih-mul3.c @@ -1,4 +1,4 @@ -/* mpihelp-mul_3.c - MPI helper functions +/* mpih-mul3.c - MPI helper functions * Copyright (C) 1994, 1996, 1997, 1998, 2001, * 2002 Free Software Foundation, Inc. * @@ -36,31 +36,33 @@ mpi_limb_t _gcry_mpih_submul_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 ); + 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; + return cy_limb; } diff --git a/mpi/generic/mpih-rshift.c b/mpi/generic/mpih-rshift.c index eacc0342..e40794fc 100644 --- a/mpi/generic/mpih-rshift.c +++ b/mpi/generic/mpih-rshift.c @@ -43,24 +43,25 @@ mpi_limb_t _gcry_mpih_rshift( mpi_ptr_t wp, mpi_ptr_t up, mpi_size_t usize, unsigned cnt) { - mpi_limb_t high_limb, low_limb; - unsigned sh_1, sh_2; - mpi_size_t i; - mpi_limb_t retval; + mpi_limb_t high_limb, low_limb; + unsigned sh_1, sh_2; + mpi_size_t i; + mpi_limb_t retval; - sh_1 = cnt; - wp -= 1; - sh_2 = BITS_PER_MPI_LIMB - sh_1; - high_limb = up[0]; - retval = high_limb << sh_2; - low_limb = high_limb; - for( i=1; i < usize; i++) { - high_limb = up[i]; - wp[i] = (low_limb >> sh_1) | (high_limb << sh_2); - low_limb = high_limb; + sh_1 = cnt; + wp -= 1; + sh_2 = BITS_PER_MPI_LIMB - sh_1; + high_limb = up[0]; + retval = high_limb << sh_2; + low_limb = high_limb; + for (i=1; i < usize; i++) + { + high_limb = up[i]; + wp[i] = (low_limb >> sh_1) | (high_limb << sh_2); + low_limb = high_limb; } - wp[i] = low_limb >> sh_1; + wp[i] = low_limb >> sh_1; - return retval; + return retval; } diff --git a/mpi/generic/mpih-sub1.c b/mpi/generic/mpih-sub1.c index 2472ed5c..e88821bf 100644 --- a/mpi/generic/mpih-sub1.c +++ b/mpi/generic/mpih-sub1.c @@ -35,30 +35,32 @@ mpi_limb_t _gcry_mpih_sub_n( mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, mpi_ptr_t s2_ptr, mpi_size_t size) { - mpi_limb_t x, y, cy; - mpi_size_t j; + mpi_limb_t x, y, cy; + mpi_size_t j; - /* The loop counter and index J goes from -SIZE to -1. This way - the loop becomes faster. */ - j = -size; + /* The loop counter and index J goes from -SIZE to -1. This way + the loop becomes faster. */ + j = -size; - /* Offset the base pointers to compensate for the negative indices. */ - s1_ptr -= j; - s2_ptr -= j; - res_ptr -= j; + /* Offset the base pointers to compensate for the negative indices. */ + s1_ptr -= j; + s2_ptr -= j; + res_ptr -= j; - cy = 0; - do { - y = s2_ptr[j]; - x = s1_ptr[j]; - y += cy; /* add previous carry to subtrahend */ - cy = y < cy; /* get out carry from that addition */ - y = x - y; /* main subtract */ - cy += y > x; /* get out carry from the subtract, combine */ - res_ptr[j] = y; - } while( ++j ); + cy = 0; + do + { + y = s2_ptr[j]; + x = s1_ptr[j]; + y += cy; /* add previous carry to subtrahend */ + cy = y < cy; /* get out carry from that addition */ + y = x - y; /* main subtract */ + cy += y > x; /* get out carry from the subtract, combine */ + res_ptr[j] = y; + } + while( ++j ); - return cy; + return cy; } diff --git a/mpi/generic/udiv-w-sdiv.c b/mpi/generic/udiv-w-sdiv.c index b49c07f3..e80d98bc 100644 --- a/mpi/generic/udiv-w-sdiv.c +++ b/mpi/generic/udiv-w-sdiv.c @@ -1,5 +1,5 @@ -/* mpihelp_udiv_w_sdiv -- implement udiv_qrnnd on machines with only signed - * division. +/* mpih-w-sdiv -- implement udiv_qrnnd on machines with only signed + * division. * Copyright (C) 1992, 1994, 1996, 1998, 2002 Free Software Foundation, Inc. * Contributed by Peter L. Montgomery. * -- cgit v1.2.1