diff options
author | lloyd <[email protected]> | 2013-07-30 19:14:19 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2013-07-30 19:14:19 +0000 |
commit | 0abddf092a646168b0cb5648b940e7baf6188bf4 (patch) | |
tree | ad85d4d2b108dc7073299a77ef58e6e4a59191bc | |
parent | 8de61c663139ece92c23242854262efef8cd7c4d (diff) |
Rename mp_asm.h to mp_madd.h
-rw-r--r-- | src/math/bigint/divide.cpp | 2 | ||||
-rw-r--r-- | src/math/mp/mp_asm.cpp | 18 | ||||
-rw-r--r-- | src/math/mp/mp_core.h | 5 | ||||
-rw-r--r-- | src/math/mp/mp_generic/info.txt | 2 | ||||
-rw-r--r-- | src/math/mp/mp_generic/mp_asmi.h | 2 | ||||
-rw-r--r-- | src/math/mp/mp_generic/mp_madd.h (renamed from src/math/mp/mp_generic/mp_asm.h) | 4 | ||||
-rw-r--r-- | src/math/mp/mp_misc.cpp | 2 | ||||
-rw-r--r-- | src/math/mp/mp_monty.cpp | 2 | ||||
-rw-r--r-- | src/math/mp/mp_mulop.cpp | 2 | ||||
-rw-r--r-- | src/math/mp/mp_x86_32/info.txt | 2 | ||||
-rw-r--r-- | src/math/mp/mp_x86_32/mp_asmi.h | 2 | ||||
-rw-r--r-- | src/math/mp/mp_x86_32/mp_madd.h (renamed from src/math/mp/mp_x86_32/mp_asm.h) | 4 | ||||
-rw-r--r-- | src/math/mp/mp_x86_32_msvc/info.txt | 2 | ||||
-rw-r--r-- | src/math/mp/mp_x86_32_msvc/mp_asmi.h | 2 | ||||
-rw-r--r-- | src/math/mp/mp_x86_64/info.txt | 2 | ||||
-rw-r--r-- | src/math/mp/mp_x86_64/mp_asmi.h | 2 | ||||
-rw-r--r-- | src/math/mp/mp_x86_64/mp_madd.h (renamed from src/math/mp/mp_x86_64/mp_asm.h) | 4 |
17 files changed, 21 insertions, 38 deletions
diff --git a/src/math/bigint/divide.cpp b/src/math/bigint/divide.cpp index c8b82422a..8b21bce13 100644 --- a/src/math/bigint/divide.cpp +++ b/src/math/bigint/divide.cpp @@ -7,7 +7,7 @@ #include <botan/divide.h> #include <botan/internal/mp_core.h> -#include <botan/internal/mp_asmi.h> +#include <botan/internal/mp_madd.h> namespace Botan { diff --git a/src/math/mp/mp_asm.cpp b/src/math/mp/mp_asm.cpp index 3ba52c4b1..7f98b47cb 100644 --- a/src/math/mp/mp_asm.cpp +++ b/src/math/mp/mp_asm.cpp @@ -6,11 +6,7 @@ * Distributed under the terms of the Botan license */ -#include <botan/internal/mp_asm.h> -#include <botan/internal/mp_asmi.h> #include <botan/internal/mp_core.h> -#include <botan/exceptn.h> -#include <botan/mem_ops.h> namespace Botan { @@ -21,20 +17,6 @@ extern "C" { */ word bigint_add2_nc(word x[], size_t x_size, const word y[], size_t y_size) { - word carry = 0; - - const size_t blocks = y_size - (y_size % 8); - - for(size_t i = 0; i != blocks; i += 8) - carry = word8_add2(x + i, y + i, carry); - - for(size_t i = blocks; i != y_size; ++i) - x[i] = word_add(x[i], y[i], &carry); - - for(size_t i = y_size; i != x_size; ++i) - x[i] = word_add(x[i], 0, &carry); - - return carry; } /* diff --git a/src/math/mp/mp_core.h b/src/math/mp/mp_core.h index a84b38cdd..c25cb994f 100644 --- a/src/math/mp/mp_core.h +++ b/src/math/mp/mp_core.h @@ -1,12 +1,13 @@ /* * MPI Algorithms * (C) 1999-2010 Jack Lloyd +* 2006 Luca Piccarreta * * Distributed under the terms of the Botan license */ -#ifndef BOTAN_MP_CORE_H__ -#define BOTAN_MP_CORE_H__ +#ifndef BOTAN_MP_CORE_OPS_H__ +#define BOTAN_MP_CORE_OPS_H__ #include <botan/mp_types.h> diff --git a/src/math/mp/mp_generic/info.txt b/src/math/mp/mp_generic/info.txt index ab4d7406a..c87dd00ca 100644 --- a/src/math/mp/mp_generic/info.txt +++ b/src/math/mp/mp_generic/info.txt @@ -1,6 +1,6 @@ load_on dep <header:internal> -mp_asm.h +mp_madd.h mp_asmi.h </header:internal> diff --git a/src/math/mp/mp_generic/mp_asmi.h b/src/math/mp/mp_generic/mp_asmi.h index 8225f372d..018055696 100644 --- a/src/math/mp/mp_generic/mp_asmi.h +++ b/src/math/mp/mp_generic/mp_asmi.h @@ -9,7 +9,7 @@ #ifndef BOTAN_MP_ASM_INTERNAL_H__ #define BOTAN_MP_ASM_INTERNAL_H__ -#include <botan/internal/mp_asm.h> +#include <botan/internal/mp_madd.h> namespace Botan { diff --git a/src/math/mp/mp_generic/mp_asm.h b/src/math/mp/mp_generic/mp_madd.h index ff00cc24b..17713f55f 100644 --- a/src/math/mp/mp_generic/mp_asm.h +++ b/src/math/mp/mp_generic/mp_madd.h @@ -6,8 +6,8 @@ * Distributed under the terms of the Botan license */ -#ifndef BOTAN_MP_ASM_H__ -#define BOTAN_MP_ASM_H__ +#ifndef BOTAN_MP_WORD_MULADD_H__ +#define BOTAN_MP_WORD_MULADD_H__ #include <botan/mp_types.h> diff --git a/src/math/mp/mp_misc.cpp b/src/math/mp/mp_misc.cpp index 2aff00592..0efd5fd19 100644 --- a/src/math/mp/mp_misc.cpp +++ b/src/math/mp/mp_misc.cpp @@ -6,7 +6,7 @@ */ #include <botan/internal/mp_core.h> -#include <botan/internal/mp_asm.h> +#include <botan/internal/mp_madd.h> namespace Botan { diff --git a/src/math/mp/mp_monty.cpp b/src/math/mp/mp_monty.cpp index 57a2b51a6..095457dbe 100644 --- a/src/math/mp/mp_monty.cpp +++ b/src/math/mp/mp_monty.cpp @@ -7,7 +7,7 @@ */ #include <botan/internal/mp_core.h> -#include <botan/internal/mp_asm.h> +#include <botan/internal/mp_madd.h> #include <botan/internal/mp_asmi.h> #include <botan/mem_ops.h> diff --git a/src/math/mp/mp_mulop.cpp b/src/math/mp/mp_mulop.cpp index e6a8ba891..0c79cc2ef 100644 --- a/src/math/mp/mp_mulop.cpp +++ b/src/math/mp/mp_mulop.cpp @@ -6,7 +6,7 @@ */ #include <botan/internal/mp_core.h> -#include <botan/internal/mp_asm.h> +#include <botan/internal/mp_madd.h> #include <botan/internal/mp_asmi.h> #include <botan/mem_ops.h> diff --git a/src/math/mp/mp_x86_32/info.txt b/src/math/mp/mp_x86_32/info.txt index 432f909f8..f36abaf62 100644 --- a/src/math/mp/mp_x86_32/info.txt +++ b/src/math/mp/mp_x86_32/info.txt @@ -3,7 +3,7 @@ load_on dep mp_bits 32 <header:internal> -mp_asm.h +mp_madd.h mp_asmi.h </header:internal> diff --git a/src/math/mp/mp_x86_32/mp_asmi.h b/src/math/mp/mp_x86_32/mp_asmi.h index c7b679e80..9b858c8d5 100644 --- a/src/math/mp/mp_x86_32/mp_asmi.h +++ b/src/math/mp/mp_x86_32/mp_asmi.h @@ -9,7 +9,7 @@ #ifndef BOTAN_MP_ASM_INTERNAL_H__ #define BOTAN_MP_ASM_INTERNAL_H__ -#include <botan/internal/mp_asm.h> +#include <botan/internal/mp_madd.h> namespace Botan { diff --git a/src/math/mp/mp_x86_32/mp_asm.h b/src/math/mp/mp_x86_32/mp_madd.h index 9be5680f8..9d60c721d 100644 --- a/src/math/mp/mp_x86_32/mp_asm.h +++ b/src/math/mp/mp_x86_32/mp_madd.h @@ -6,8 +6,8 @@ * Distributed under the terms of the Botan license */ -#ifndef BOTAN_MP_ASM_H__ -#define BOTAN_MP_ASM_H__ +#ifndef BOTAN_MP_WORD_MULADD_H__ +#define BOTAN_MP_WORD_MULADD_H__ #include <botan/mp_types.h> diff --git a/src/math/mp/mp_x86_32_msvc/info.txt b/src/math/mp/mp_x86_32_msvc/info.txt index 8d35c02e7..3029d6a61 100644 --- a/src/math/mp/mp_x86_32_msvc/info.txt +++ b/src/math/mp/mp_x86_32_msvc/info.txt @@ -3,7 +3,7 @@ mp_bits 32 load_on dep <header:internal> -mp_generic:mp_asm.h +mp_generic:mp_madd.h mp_asmi.h </header:internal> diff --git a/src/math/mp/mp_x86_32_msvc/mp_asmi.h b/src/math/mp/mp_x86_32_msvc/mp_asmi.h index aee457d65..ef149c920 100644 --- a/src/math/mp/mp_x86_32_msvc/mp_asmi.h +++ b/src/math/mp/mp_x86_32_msvc/mp_asmi.h @@ -9,7 +9,7 @@ #ifndef BOTAN_MP_ASM_INTERNAL_H__ #define BOTAN_MP_ASM_INTERNAL_H__ -#include <botan/internal/mp_asm.h> +#include <botan/internal/mp_madd.h> namespace Botan { diff --git a/src/math/mp/mp_x86_64/info.txt b/src/math/mp/mp_x86_64/info.txt index fdcc05dd6..75c42ddc1 100644 --- a/src/math/mp/mp_x86_64/info.txt +++ b/src/math/mp/mp_x86_64/info.txt @@ -3,7 +3,7 @@ load_on dep mp_bits 64 <header:internal> -mp_asm.h +mp_madd.h mp_asmi.h </header:internal> diff --git a/src/math/mp/mp_x86_64/mp_asmi.h b/src/math/mp/mp_x86_64/mp_asmi.h index f14df0e89..b2f1202e3 100644 --- a/src/math/mp/mp_x86_64/mp_asmi.h +++ b/src/math/mp/mp_x86_64/mp_asmi.h @@ -9,7 +9,7 @@ #ifndef BOTAN_MP_ASM_INTERNAL_H__ #define BOTAN_MP_ASM_INTERNAL_H__ -#include <botan/internal/mp_asm.h> +#include <botan/internal/mp_madd.h> namespace Botan { diff --git a/src/math/mp/mp_x86_64/mp_asm.h b/src/math/mp/mp_x86_64/mp_madd.h index edfaf6352..4c0d79931 100644 --- a/src/math/mp/mp_x86_64/mp_asm.h +++ b/src/math/mp/mp_x86_64/mp_madd.h @@ -6,8 +6,8 @@ * Distributed under the terms of the Botan license */ -#ifndef BOTAN_MP_ASM_H__ -#define BOTAN_MP_ASM_H__ +#ifndef BOTAN_MP_WORD_MULADD_H__ +#define BOTAN_MP_WORD_MULADD_H__ #include <botan/mp_types.h> |