aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mp_ia32/mp_asm.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-09-28 15:34:09 +0000
committerlloyd <[email protected]>2008-09-28 15:34:09 +0000
commitea32d18231b9c6c5c84b3754c4249170d3b4e4c0 (patch)
treecc179337d0594ed105768011722b9dbae105e07a /modules/mp_ia32/mp_asm.h
parentb841401e095cfc1aa0708689d7920eb95ece71af (diff)
This is the first checkin to net.randombit.botan.modularized, which
has the intent of modularizing Botan's source code, and making it much easier to add or remove various things at compile time. In this first checkin: Add support for nested directories in modules/ and move all the modules into grouped directories like entropy/ or compression/ Currently this is not ideal, it will _only_ find code in modules/*/*/modinfo.txt, while it would be much better to allow for arbitrary nestings under modules (find modules -name modinfo.txt) for more complicated setups. This 'new' (OMG I've found directories!) structure allows for a more free naming convention (no need for leading es_, ml_, etc to group names, though some keep it for lack of a more meaningful name being obvious to me right at the moment).
Diffstat (limited to 'modules/mp_ia32/mp_asm.h')
-rw-r--r--modules/mp_ia32/mp_asm.h65
1 files changed, 0 insertions, 65 deletions
diff --git a/modules/mp_ia32/mp_asm.h b/modules/mp_ia32/mp_asm.h
deleted file mode 100644
index b45140321..000000000
--- a/modules/mp_ia32/mp_asm.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*************************************************
-* Lowest Level MPI Algorithms Header File *
-* (C) 1999-2008 Jack Lloyd *
-* 2006 Luca Piccarreta *
-*************************************************/
-
-#ifndef BOTAN_MP_ASM_H__
-#define BOTAN_MP_ASM_H__
-
-#include <botan/mp_types.h>
-
-#if (BOTAN_MP_WORD_BITS != 32)
- #error The mp_ia32 module requires that BOTAN_MP_WORD_BITS == 32
-#endif
-
-namespace Botan {
-
-extern "C" {
-
-/*************************************************
-* Helper Macros for x86 Assembly *
-*************************************************/
-#define ASM(x) x "\n\t"
-
-/*************************************************
-* Word Multiply *
-*************************************************/
-inline word word_madd2(word a, word b, word* c)
- {
- asm(
- ASM("mull %[b]")
- ASM("addl %[c],%[a]")
- ASM("adcl $0,%[carry]")
-
- : [a]"=a"(a), [b]"=rm"(b), [carry]"=&d"(*c)
- : "0"(a), "1"(b), [c]"g"(*c) : "cc");
-
- return a;
- }
-
-/*************************************************
-* Word Multiply/Add *
-*************************************************/
-inline word word_madd3(word a, word b, word c, word* d)
- {
- asm(
- ASM("mull %[b]")
-
- ASM("addl %[c],%[a]")
- ASM("adcl $0,%[carry]")
-
- ASM("addl %[d],%[a]")
- ASM("adcl $0,%[carry]")
-
- : [a]"=a"(a), [b]"=rm"(b), [carry]"=&d"(*d)
- : "0"(a), "1"(b), [c]"g"(c), [d]"g"(*d) : "cc");
-
- return a;
- }
-
-}
-
-}
-
-#endif