aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-06-06 00:16:56 +0000
committerlloyd <[email protected]>2006-06-06 00:16:56 +0000
commit537a212258bee02c63348f301c0b2b32f9210648 (patch)
tree6817a180e9bac583965284924f8c07cca262c855
parentb377b2d7c8e7947f7e6d6a3fce3edb76b0e2d928 (diff)
Instead of #undef'ing ASM at the end of mp_asm.h, just have
mp_asmi.h check to see if it has already been defined.
-rw-r--r--modules/mp_amd64/mp_asm.h3
-rw-r--r--modules/mp_amd64/mp_asmi.h4
-rw-r--r--modules/mp_ia32/mp_asm.h3
-rw-r--r--modules/mp_ia32/mp_asmi.h4
4 files changed, 6 insertions, 8 deletions
diff --git a/modules/mp_amd64/mp_asm.h b/modules/mp_amd64/mp_asm.h
index cd5debfa9..b8f678bbb 100644
--- a/modules/mp_amd64/mp_asm.h
+++ b/modules/mp_amd64/mp_asm.h
@@ -95,9 +95,6 @@ inline void word3_muladd_2(word* w2, word* w1, word* w0, word x, word y)
: "cc");
}
-// fixme
-#undef ASM
-
}
}
diff --git a/modules/mp_amd64/mp_asmi.h b/modules/mp_amd64/mp_asmi.h
index daa1243ca..cb606cfe3 100644
--- a/modules/mp_amd64/mp_asmi.h
+++ b/modules/mp_amd64/mp_asmi.h
@@ -13,7 +13,9 @@ namespace Botan {
/*************************************************
* Helper Macros for amd64 Assembly *
*************************************************/
-#define ASM(x) x "\n\t"
+#ifndef ASM
+ #define ASM(x) x "\n\t"
+#endif
#define ADDSUB2_OP(OPERATION, INDEX) \
ASM("movq 8*" INDEX "(%[y]), %[carry]") \
diff --git a/modules/mp_ia32/mp_asm.h b/modules/mp_ia32/mp_asm.h
index 0d6dcab97..374fd506b 100644
--- a/modules/mp_ia32/mp_asm.h
+++ b/modules/mp_ia32/mp_asm.h
@@ -95,9 +95,6 @@ inline void word3_muladd_2(word* w2, word* w1, word* w0, word x, word y)
: "cc");
}
-// fixme
-#undef ASM
-
}
}
diff --git a/modules/mp_ia32/mp_asmi.h b/modules/mp_ia32/mp_asmi.h
index b75b79a9d..979ae6ca7 100644
--- a/modules/mp_ia32/mp_asmi.h
+++ b/modules/mp_ia32/mp_asmi.h
@@ -13,7 +13,9 @@ namespace Botan {
/*************************************************
* Helper Macros for x86 Assembly *
*************************************************/
-#define ASM(x) x "\n\t"
+#ifndef ASM
+ #define ASM(x) x "\n\t"
+#endif
#define ADDSUB2_OP(OPERATION, INDEX) \
ASM("movl 4*" INDEX "(%[y]), %[carry]") \