aboutsummaryrefslogtreecommitdiffstats
path: root/src/math/bigint/mp_amd64
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-03-30 18:27:18 +0000
committerlloyd <[email protected]>2009-03-30 18:27:18 +0000
commit96d6eb6f29c55e16a37cf11899547886f735b065 (patch)
tree9f13901e9b44c98d58b2589c9b09c6a7443eb7cd /src/math/bigint/mp_amd64
parent3cc3dd72c5f87b76852a55c1f2d1821dba967d8c (diff)
Thomas Moschny passed along a request from the Fedora packagers which came
up during the Fedora submission review, that each source file include some text about the license. One handy Perl script later and each file now has the line Distributed under the terms of the Botan license after the copyright notices. While I was in there modifying every file anyway, I also stripped out the remainder of the block comments (lots of astericks before and after the text); this is stylistic thing I picked up when I was first learning C++ but in retrospect it is not a good style as the structure makes it harder to modify comments (with the result that comments become fewer, shorter and are less likely to be updated, which are not good things).
Diffstat (limited to 'src/math/bigint/mp_amd64')
-rw-r--r--src/math/bigint/mp_amd64/mp_asm.h30
-rw-r--r--src/math/bigint/mp_amd64/mp_asmi.h84
2 files changed, 59 insertions, 55 deletions
diff --git a/src/math/bigint/mp_amd64/mp_asm.h b/src/math/bigint/mp_amd64/mp_asm.h
index eca7bae6c..fa66d04f3 100644
--- a/src/math/bigint/mp_amd64/mp_asm.h
+++ b/src/math/bigint/mp_amd64/mp_asm.h
@@ -1,8 +1,10 @@
-/*************************************************
-* Lowest Level MPI Algorithms Header File *
-* (C) 1999-2008 Jack Lloyd *
-* 2006 Luca Piccarreta *
-*************************************************/
+/*
+* Lowest Level MPI Algorithms
+* (C) 1999-2008 Jack Lloyd
+* 2006 Luca Piccarreta
+*
+* Distributed under the terms of the Botan license
+*/
#ifndef BOTAN_MP_ASM_H__
#define BOTAN_MP_ASM_H__
@@ -17,14 +19,14 @@ namespace Botan {
extern "C" {
-/*************************************************
-* Helper Macros for amd64 Assembly *
-*************************************************/
+/*
+* Helper Macros for amd64 Assembly
+*/
#define ASM(x) x "\n\t"
-/*************************************************
-* Word Multiply *
-*************************************************/
+/*
+* Word Multiply
+*/
inline word word_madd2(word a, word b, word* c)
{
asm(
@@ -38,9 +40,9 @@ inline word word_madd2(word a, word b, word* c)
return a;
}
-/*************************************************
-* Word Multiply/Add *
-*************************************************/
+/*
+* Word Multiply/Add
+*/
inline word word_madd3(word a, word b, word c, word* d)
{
asm(
diff --git a/src/math/bigint/mp_amd64/mp_asmi.h b/src/math/bigint/mp_amd64/mp_asmi.h
index bf3469526..8bccbaaf4 100644
--- a/src/math/bigint/mp_amd64/mp_asmi.h
+++ b/src/math/bigint/mp_amd64/mp_asmi.h
@@ -1,8 +1,10 @@
-/*************************************************
-* Lowest Level MPI Algorithms Header File *
-* (C) 1999-2007 Jack Lloyd *
-* 2006 Luca Piccarreta *
-*************************************************/
+/*
+* Lowest Level MPI Algorithms
+* (C) 1999-2007 Jack Lloyd
+* 2006 Luca Piccarreta
+*
+* Distributed under the terms of the Botan license
+*/
#ifndef BOTAN_MP_ASM_INTERNAL_H__
#define BOTAN_MP_ASM_INTERNAL_H__
@@ -13,9 +15,9 @@ namespace Botan {
extern "C" {
-/*************************************************
-* Helper Macros for amd64 Assembly *
-*************************************************/
+/*
+* Helper Macros for amd64 Assembly
+*/
#ifndef ASM
#define ASM(x) x "\n\t"
#endif
@@ -63,9 +65,9 @@ extern "C" {
ASM("sbbq %[carry],%[carry]") \
ASM("negq %[carry]")
-/*************************************************
-* Word Addition *
-*************************************************/
+/*
+* Word Addition
+*/
inline word word_add(word x, word y, word* carry)
{
#if 0
@@ -84,9 +86,9 @@ inline word word_add(word x, word y, word* carry)
#endif
}
-/*************************************************
-* Eight Word Block Addition, Two Argument *
-*************************************************/
+/*
+* Eight Word Block Addition, Two Argument
+*/
inline word word8_add2(word x[8], const word y[8], word carry)
{
asm(
@@ -97,9 +99,9 @@ inline word word8_add2(word x[8], const word y[8], word carry)
return carry;
}
-/*************************************************
-* Eight Word Block Addition, Three Argument *
-*************************************************/
+/*
+* Eight Word Block Addition, Three Argument
+*/
inline word word8_add3(word z[8], const word x[8], const word y[8], word carry)
{
asm(
@@ -110,9 +112,9 @@ inline word word8_add3(word z[8], const word x[8], const word y[8], word carry)
return carry;
}
-/*************************************************
-* Word Subtraction *
-*************************************************/
+/*
+* Word Subtraction
+*/
inline word word_sub(word x, word y, word* carry)
{
asm(
@@ -123,9 +125,9 @@ inline word word_sub(word x, word y, word* carry)
return x;
}
-/*************************************************
-* Eight Word Block Subtraction, Two Argument *
-*************************************************/
+/*
+* Eight Word Block Subtraction, Two Argument
+*/
inline word word8_sub2(word x[8], const word y[8], word carry)
{
asm(
@@ -136,9 +138,9 @@ inline word word8_sub2(word x[8], const word y[8], word carry)
return carry;
}
-/*************************************************
-* Eight Word Block Subtraction, Three Argument *
-*************************************************/
+/*
+* Eight Word Block Subtraction, Three Argument
+*/
inline word word8_sub3(word z[8], const word x[8], const word y[8], word carry)
{
asm(
@@ -149,9 +151,9 @@ inline word word8_sub3(word z[8], const word x[8], const word y[8], word carry)
return carry;
}
-/*************************************************
-* Eight Word Block Linear Multiplication *
-*************************************************/
+/*
+* Eight Word Block Linear Multiplication
+*/
inline word word8_linmul2(word x[8], word y, word carry)
{
asm(
@@ -162,9 +164,9 @@ inline word word8_linmul2(word x[8], word y, word carry)
return carry;
}
-/*************************************************
-* Eight Word Block Linear Multiplication *
-*************************************************/
+/*
+* Eight Word Block Linear Multiplication
+*/
inline word word8_linmul3(word z[8], const word x[8], word y, word carry)
{
asm(
@@ -175,9 +177,9 @@ inline word word8_linmul3(word z[8], const word x[8], word y, word carry)
return carry;
}
-/*************************************************
-* Eight Word Block Multiply/Add *
-*************************************************/
+/*
+* Eight Word Block Multiply/Add
+*/
inline word word8_madd3(word z[8], const word x[8], word y, word carry)
{
asm(
@@ -188,9 +190,9 @@ inline word word8_madd3(word z[8], const word x[8], word y, word carry)
return carry;
}
-/*************************************************
-* Multiply-Add Accumulator *
-*************************************************/
+/*
+* Multiply-Add Accumulator
+*/
inline void word3_muladd(word* w2, word* w1, word* w0, word x, word y)
{
asm(
@@ -205,9 +207,9 @@ inline void word3_muladd(word* w2, word* w1, word* w0, word x, word y)
: "cc");
}
-/*************************************************
-* Multiply-Add Accumulator *
-*************************************************/
+/*
+* Multiply-Add Accumulator
+*/
inline void word3_muladd_2(word* w2, word* w1, word* w0, word x, word y)
{
asm(