aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/math/bigint/mp_asm64/info.txt1
-rw-r--r--src/math/bigint/mp_asm64/mp_asm.h7
2 files changed, 8 insertions, 0 deletions
diff --git a/src/math/bigint/mp_asm64/info.txt b/src/math/bigint/mp_asm64/info.txt
index 85a4391b9..5c112c490 100644
--- a/src/math/bigint/mp_asm64/info.txt
+++ b/src/math/bigint/mp_asm64/info.txt
@@ -10,6 +10,7 @@ mp_generic:mp_asmi.h
</add>
<arch>
+#amd64
alpha
ia64
mips64
diff --git a/src/math/bigint/mp_asm64/mp_asm.h b/src/math/bigint/mp_asm64/mp_asm.h
index e455b3616..f751a50f8 100644
--- a/src/math/bigint/mp_asm64/mp_asm.h
+++ b/src/math/bigint/mp_asm64/mp_asm.h
@@ -21,6 +21,13 @@ namespace Botan {
z1 = a * b; \
} while(0);
+#elif defined(BOTAN_TARGET_ARCH_IS_AMD64)
+
+#define BOTAN_WORD_MUL(a,b,z1,z0) do { \
+ asm("mulq %3" : "=d" (z0), "=a" (z1) : \
+ "a" (a), "rm" (b) : "cc"); \
+} while(0);
+
#elif defined(BOTAN_TARGET_ARCH_IS_IA64)
#define BOTAN_WORD_MUL(a,b,z1,z0) do { \