aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mp_amd64
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-06-08 04:55:36 +0000
committerlloyd <[email protected]>2006-06-08 04:55:36 +0000
commitfada227a69d66ec1bafe026092642b67634bcb4f (patch)
treec74ac1254b3f83852fddadd813ff4d532d7fa612 /modules/mp_amd64
parent1803a342b3d8617695a231c3c189eda871debb17 (diff)
Move word3_muladd* in the x86 and amd64 assembly modules.
Diffstat (limited to 'modules/mp_amd64')
-rw-r--r--modules/mp_amd64/mp_asm.h38
-rw-r--r--modules/mp_amd64/mp_asmi.h38
2 files changed, 38 insertions, 38 deletions
diff --git a/modules/mp_amd64/mp_asm.h b/modules/mp_amd64/mp_asm.h
index b8f678bbb..f67935936 100644
--- a/modules/mp_amd64/mp_asm.h
+++ b/modules/mp_amd64/mp_asm.h
@@ -57,44 +57,6 @@ inline word word_madd3(word a, word b, word c, word d, word* carry)
return a;
}
-/*************************************************
-* Multiply-Add Accumulator *
-*************************************************/
-inline void word3_muladd(word* w2, word* w1, word* w0, word x, word y)
- {
- asm(
- ASM("mulq %[y]")
-
- ASM("addq %[x],%[w0]")
- ASM("adcq %[y],%[w1]")
- ASM("adcq $0,%[w2]")
-
- : [w0]"=r"(*w0), [w1]"=r"(*w1), [w2]"=r"(*w2)
- : [x]"a"(x), [y]"d"(y), "0"(*w0), "1"(*w1), "2"(*w2)
- : "cc");
- }
-
-/*************************************************
-* Multiply-Add Accumulator *
-*************************************************/
-inline void word3_muladd_2(word* w2, word* w1, word* w0, word x, word y)
- {
- asm(
- ASM("mulq %[y]")
-
- ASM("addq %[x],%[w0]")
- ASM("adcq %[y],%[w1]")
- ASM("adcq $0,%[w2]")
-
- ASM("addq %[x],%[w0]")
- ASM("adcq %[y],%[w1]")
- ASM("adcq $0,%[w2]")
-
- : [w0]"=r"(*w0), [w1]"=r"(*w1), [w2]"=r"(*w2)
- : [x]"a"(x), [y]"d"(y), "0"(*w0), "1"(*w1), "2"(*w2)
- : "cc");
- }
-
}
}
diff --git a/modules/mp_amd64/mp_asmi.h b/modules/mp_amd64/mp_asmi.h
index cb606cfe3..5366e6d50 100644
--- a/modules/mp_amd64/mp_asmi.h
+++ b/modules/mp_amd64/mp_asmi.h
@@ -171,6 +171,44 @@ inline word word8_madd3(word z[8], const word x[8], word y, word carry)
return carry;
}
+/*************************************************
+* Multiply-Add Accumulator *
+*************************************************/
+inline void word3_muladd(word* w2, word* w1, word* w0, word x, word y)
+ {
+ asm(
+ ASM("mulq %[y]")
+
+ ASM("addq %[x],%[w0]")
+ ASM("adcq %[y],%[w1]")
+ ASM("adcq $0,%[w2]")
+
+ : [w0]"=r"(*w0), [w1]"=r"(*w1), [w2]"=r"(*w2)
+ : [x]"a"(x), [y]"d"(y), "0"(*w0), "1"(*w1), "2"(*w2)
+ : "cc");
+ }
+
+/*************************************************
+* Multiply-Add Accumulator *
+*************************************************/
+inline void word3_muladd_2(word* w2, word* w1, word* w0, word x, word y)
+ {
+ asm(
+ ASM("mulq %[y]")
+
+ ASM("addq %[x],%[w0]")
+ ASM("adcq %[y],%[w1]")
+ ASM("adcq $0,%[w2]")
+
+ ASM("addq %[x],%[w0]")
+ ASM("adcq %[y],%[w1]")
+ ASM("adcq $0,%[w2]")
+
+ : [w0]"=r"(*w0), [w1]"=r"(*w1), [w2]"=r"(*w2)
+ : [x]"a"(x), [y]"d"(y), "0"(*w0), "1"(*w1), "2"(*w2)
+ : "cc");
+ }
+
}
#endif