aboutsummaryrefslogtreecommitdiff
path: root/src/Specific/montgomery64_2e322m2e161m1
diff options
context:
space:
mode:
authorGravatar Jason Gross <jgross@mit.edu>2017-11-02 01:36:04 -0400
committerGravatar Jason Gross <jgross@mit.edu>2017-11-02 01:36:04 -0400
commit5b45aa93efa19d54e50299ff0df8ee46c60f891b (patch)
tree9cea98ab783f557b5cbca0456a4dc3b4498e43c5 /src/Specific/montgomery64_2e322m2e161m1
parente8bda9b779d5762c5868cd09c85142151655d5ca (diff)
Update display logs and c files
Diffstat (limited to 'src/Specific/montgomery64_2e322m2e161m1')
-rw-r--r--src/Specific/montgomery64_2e322m2e161m1/feadd.c46
-rw-r--r--src/Specific/montgomery64_2e322m2e161m1/feadd.h6
-rw-r--r--src/Specific/montgomery64_2e322m2e161m1/femul.c41
-rw-r--r--src/Specific/montgomery64_2e322m2e161m1/femul.h6
-rw-r--r--src/Specific/montgomery64_2e322m2e161m1/fenz.c27
-rw-r--r--src/Specific/montgomery64_2e322m2e161m1/fenz.h6
-rw-r--r--src/Specific/montgomery64_2e322m2e161m1/feopp.c46
-rw-r--r--src/Specific/montgomery64_2e322m2e161m1/feopp.h6
-rw-r--r--src/Specific/montgomery64_2e322m2e161m1/fesub.c46
-rw-r--r--src/Specific/montgomery64_2e322m2e161m1/fesub.h6
10 files changed, 236 insertions, 0 deletions
diff --git a/src/Specific/montgomery64_2e322m2e161m1/feadd.c b/src/Specific/montgomery64_2e322m2e161m1/feadd.c
new file mode 100644
index 000000000..659abdb6a
--- /dev/null
+++ b/src/Specific/montgomery64_2e322m2e161m1/feadd.c
@@ -0,0 +1,46 @@
+#include <stdint.h>
+#include <stdbool.h>
+#include <x86intrin.h>
+#include "liblow.h"
+
+#include "feadd.h"
+
+typedef unsigned int uint128_t __attribute__((mode(TI)));
+
+#if (defined(__GNUC__) || defined(__GNUG__)) && !(defined(__clang__)||defined(__INTEL_COMPILER))
+// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81294
+#define _subborrow_u32 __builtin_ia32_sbb_u32
+#define _subborrow_u64 __builtin_ia32_sbb_u64
+#endif
+
+#undef force_inline
+#define force_inline __attribute__((always_inline))
+
+void force_inline feadd(uint64_t* out, uint64_t x12, uint64_t x13, uint64_t x11, uint64_t x9, uint64_t x7, uint64_t x5, uint64_t x22, uint64_t x23, uint64_t x21, uint64_t x19, uint64_t x17, uint64_t x15)
+{ uint64_t x25; uint8_t x26 = _addcarryx_u64(0x0, x5, x15, &x25);
+{ uint64_t x28; uint8_t x29 = _addcarryx_u64(x26, x7, x17, &x28);
+{ uint64_t x31; uint8_t x32 = _addcarryx_u64(x29, x9, x19, &x31);
+{ uint64_t x34; uint8_t x35 = _addcarryx_u64(x32, x11, x21, &x34);
+{ uint64_t x37; uint8_t x38 = _addcarryx_u64(x35, x13, x23, &x37);
+{ uint64_t x40; uint8_t x41 = _addcarryx_u64(x38, x12, x22, &x40);
+{ uint64_t x43; uint8_t x44 = _subborrow_u64(0x0, x25, 0xffffffffffffffffL, &x43);
+{ uint64_t x46; uint8_t x47 = _subborrow_u64(x44, x28, 0xffffffffffffffffL, &x46);
+{ uint64_t x49; uint8_t x50 = _subborrow_u64(x47, x31, 0xfffffffdffffffffL, &x49);
+{ uint64_t x52; uint8_t x53 = _subborrow_u64(x50, x34, 0xffffffffffffffffL, &x52);
+{ uint64_t x55; uint8_t x56 = _subborrow_u64(x53, x37, 0xffffffffffffffffL, &x55);
+{ uint64_t x58; uint8_t x59 = _subborrow_u64(x56, x40, 0x3, &x58);
+{ uint64_t _; uint8_t x62 = _subborrow_u64(x59, x41, 0x0, &_);
+{ uint64_t x63 = cmovznz(x62, x58, x40);
+{ uint64_t x64 = cmovznz(x62, x55, x37);
+{ uint64_t x65 = cmovznz(x62, x52, x34);
+{ uint64_t x66 = cmovznz(x62, x49, x31);
+{ uint64_t x67 = cmovznz(x62, x46, x28);
+{ uint64_t x68 = cmovznz(x62, x43, x25);
+out[0] = x63;
+out[1] = x64;
+out[2] = x65;
+out[3] = x66;
+out[4] = x67;
+out[5] = x68;
+}}}}}}}}}}}}}}}}}}}
+// caller: uint64_t out[6];
diff --git a/src/Specific/montgomery64_2e322m2e161m1/feadd.h b/src/Specific/montgomery64_2e322m2e161m1/feadd.h
new file mode 100644
index 000000000..c4cf5692e
--- /dev/null
+++ b/src/Specific/montgomery64_2e322m2e161m1/feadd.h
@@ -0,0 +1,6 @@
+#include <stdint.h>
+
+#undef force_inline
+#define force_inline __attribute__((always_inline))
+
+void force_inline feadd(uint64_t* out, uint64_t x12, uint64_t x13, uint64_t x11, uint64_t x9, uint64_t x7, uint64_t x5, uint64_t x22, uint64_t x23, uint64_t x21, uint64_t x19, uint64_t x17, uint64_t x15);
diff --git a/src/Specific/montgomery64_2e322m2e161m1/femul.c b/src/Specific/montgomery64_2e322m2e161m1/femul.c
new file mode 100644
index 000000000..e156fe17f
--- /dev/null
+++ b/src/Specific/montgomery64_2e322m2e161m1/femul.c
@@ -0,0 +1,41 @@
+#include <stdint.h>
+#include <stdbool.h>
+#include <x86intrin.h>
+#include "liblow.h"
+
+#include "femul.h"
+
+typedef unsigned int uint128_t __attribute__((mode(TI)));
+
+#if (defined(__GNUC__) || defined(__GNUG__)) && !(defined(__clang__)||defined(__INTEL_COMPILER))
+// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81294
+#define _subborrow_u32 __builtin_ia32_sbb_u32
+#define _subborrow_u64 __builtin_ia32_sbb_u64
+#endif
+
+#undef force_inline
+#define force_inline __attribute__((always_inline))
+
+void force_inline femul(uint64_t* out, uint64_t x12, uint64_t x13, uint64_t x11, uint64_t x9, uint64_t x7, uint64_t x5, uint64_t x22, uint64_t x23, uint64_t x21, uint64_t x19, uint64_t x17, uint64_t x15)
+{ uint64_t x26; uint64_t x25 = _mulx_u64(x5, x15, &x26);
+{ uint64_t x29; uint64_t x28 = _mulx_u64(x5, x17, &x29);
+{ uint64_t x32; uint64_t x31 = _mulx_u64(x5, x19, &x32);
+{ uint64_t x35; uint64_t x34 = _mulx_u64(x5, x21, &x35);
+{ uint64_t x38; uint64_t x37 = _mulx_u64(x5, x23, &x38);
+{ uint64_t x41; uint64_t x40 = _mulx_u64(x5, x22, &x41);
+{ uint64_t x43; uint8_t x44 = _addcarryx_u64(0x0, x26, x28, &x43);
+{ uint64_t x46; uint8_t x47 = _addcarryx_u64(x44, x29, x31, &x46);
+{ uint64_t x49; uint8_t x50 = _addcarryx_u64(x47, x32, x34, &x49);
+{ uint64_t x52; uint8_t x53 = _addcarryx_u64(x50, x35, x37, &x52);
+{ uint64_t x55; uint8_t x56 = _addcarryx_u64(x53, x38, x40, &x55);
+{ uint64_t x58; uint8_t _ = _addcarryx_u64(0x0, x56, x41, &x58);
+{ uint64_t x62; uint64_t x61 = _mulx_u64(x25, 0xffffffffffffffffL, &x62);
+{ uint64_t x65; uint64_t x64 = _mulx_u64(x25, 0xffffffffffffffffL, &x65);
+{ uint64_t x68; uint64_t x67 = _mulx_u64(x25, 0xfffffffdffffffffL, &x68);
+{ uint64_t x71; uint64_t x70 = _mulx_u64(x25, 0xffffffffffffffffL, &x71);
+{ uint64_t x74; uint64_t x73 = _mulx_u64(x25, 0xffffffffffffffffL, &x74);
+out[0] = uint64_t x76;
+out[1] = uint8_t x77 = Op Syntax.MulSplit 64 Syntax.TWord 6 Syntax.TWord 3 Syntax.TWord 6 Syntax.TWord 3 x25;
+out[2] = 0x3;;
+}}}}}}}}}}}}}}}}}
+// caller: uint64_t out[3];
diff --git a/src/Specific/montgomery64_2e322m2e161m1/femul.h b/src/Specific/montgomery64_2e322m2e161m1/femul.h
new file mode 100644
index 000000000..8ce27823e
--- /dev/null
+++ b/src/Specific/montgomery64_2e322m2e161m1/femul.h
@@ -0,0 +1,6 @@
+#include <stdint.h>
+
+#undef force_inline
+#define force_inline __attribute__((always_inline))
+
+void force_inline femul(uint64_t* out, uint64_t x12, uint64_t x13, uint64_t x11, uint64_t x9, uint64_t x7, uint64_t x5, uint64_t x22, uint64_t x23, uint64_t x21, uint64_t x19, uint64_t x17, uint64_t x15);
diff --git a/src/Specific/montgomery64_2e322m2e161m1/fenz.c b/src/Specific/montgomery64_2e322m2e161m1/fenz.c
new file mode 100644
index 000000000..ad3763a14
--- /dev/null
+++ b/src/Specific/montgomery64_2e322m2e161m1/fenz.c
@@ -0,0 +1,27 @@
+#include <stdint.h>
+#include <stdbool.h>
+#include <x86intrin.h>
+#include "liblow.h"
+
+#include "fenz.h"
+
+typedef unsigned int uint128_t __attribute__((mode(TI)));
+
+#if (defined(__GNUC__) || defined(__GNUG__)) && !(defined(__clang__)||defined(__INTEL_COMPILER))
+// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81294
+#define _subborrow_u32 __builtin_ia32_sbb_u32
+#define _subborrow_u64 __builtin_ia32_sbb_u64
+#endif
+
+#undef force_inline
+#define force_inline __attribute__((always_inline))
+
+void force_inline fenz(uint64_t* out, uint64_t x9, uint64_t x10, uint64_t x8, uint64_t x6, uint64_t x4, uint64_t x2)
+{ uint64_t x11 = (x10 | x9);
+{ uint64_t x12 = (x8 | x11);
+{ uint64_t x13 = (x6 | x12);
+{ uint64_t x14 = (x4 | x13);
+{ uint64_t x15 = (x2 | x14);
+out[0] = x15;
+}}}}}
+// caller: uint64_t out[1];
diff --git a/src/Specific/montgomery64_2e322m2e161m1/fenz.h b/src/Specific/montgomery64_2e322m2e161m1/fenz.h
new file mode 100644
index 000000000..c6d44e4a7
--- /dev/null
+++ b/src/Specific/montgomery64_2e322m2e161m1/fenz.h
@@ -0,0 +1,6 @@
+#include <stdint.h>
+
+#undef force_inline
+#define force_inline __attribute__((always_inline))
+
+void force_inline fenz(uint64_t* out, uint64_t x9, uint64_t x10, uint64_t x8, uint64_t x6, uint64_t x4, uint64_t x2);
diff --git a/src/Specific/montgomery64_2e322m2e161m1/feopp.c b/src/Specific/montgomery64_2e322m2e161m1/feopp.c
new file mode 100644
index 000000000..f5026da1d
--- /dev/null
+++ b/src/Specific/montgomery64_2e322m2e161m1/feopp.c
@@ -0,0 +1,46 @@
+#include <stdint.h>
+#include <stdbool.h>
+#include <x86intrin.h>
+#include "liblow.h"
+
+#include "feopp.h"
+
+typedef unsigned int uint128_t __attribute__((mode(TI)));
+
+#if (defined(__GNUC__) || defined(__GNUG__)) && !(defined(__clang__)||defined(__INTEL_COMPILER))
+// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81294
+#define _subborrow_u32 __builtin_ia32_sbb_u32
+#define _subborrow_u64 __builtin_ia32_sbb_u64
+#endif
+
+#undef force_inline
+#define force_inline __attribute__((always_inline))
+
+void force_inline feopp(uint64_t* out, uint64_t x9, uint64_t x10, uint64_t x8, uint64_t x6, uint64_t x4, uint64_t x2)
+{ uint64_t x12; uint8_t x13 = _subborrow_u64(0x0, 0x0, x2, &x12);
+{ uint64_t x15; uint8_t x16 = _subborrow_u64(x13, 0x0, x4, &x15);
+{ uint64_t x18; uint8_t x19 = _subborrow_u64(x16, 0x0, x6, &x18);
+{ uint64_t x21; uint8_t x22 = _subborrow_u64(x19, 0x0, x8, &x21);
+{ uint64_t x24; uint8_t x25 = _subborrow_u64(x22, 0x0, x10, &x24);
+{ uint64_t x27; uint8_t x28 = _subborrow_u64(x25, 0x0, x9, &x27);
+{ uint64_t x29 = (uint64_t)cmovznz(x28, 0x0, 0xffffffffffffffffL);
+{ uint64_t x30 = (x29 & 0xffffffffffffffffL);
+{ uint64_t x32; uint8_t x33 = _addcarryx_u64(0x0, x12, x30, &x32);
+{ uint64_t x34 = (x29 & 0xffffffffffffffffL);
+{ uint64_t x36; uint8_t x37 = _addcarryx_u64(x33, x15, x34, &x36);
+{ uint64_t x38 = (x29 & 0xfffffffdffffffffL);
+{ uint64_t x40; uint8_t x41 = _addcarryx_u64(x37, x18, x38, &x40);
+{ uint64_t x42 = (x29 & 0xffffffffffffffffL);
+{ uint64_t x44; uint8_t x45 = _addcarryx_u64(x41, x21, x42, &x44);
+{ uint64_t x46 = (x29 & 0xffffffffffffffffL);
+{ uint64_t x48; uint8_t x49 = _addcarryx_u64(x45, x24, x46, &x48);
+{ uint8_t x50 = ((uint8_t)x29 & 0x3);
+{ uint64_t x52; uint8_t _ = _addcarryx_u64(x49, x27, x50, &x52);
+out[0] = x52;
+out[1] = x48;
+out[2] = x44;
+out[3] = x40;
+out[4] = x36;
+out[5] = x32;
+}}}}}}}}}}}}}}}}}}}
+// caller: uint64_t out[6];
diff --git a/src/Specific/montgomery64_2e322m2e161m1/feopp.h b/src/Specific/montgomery64_2e322m2e161m1/feopp.h
new file mode 100644
index 000000000..4fd8feee4
--- /dev/null
+++ b/src/Specific/montgomery64_2e322m2e161m1/feopp.h
@@ -0,0 +1,6 @@
+#include <stdint.h>
+
+#undef force_inline
+#define force_inline __attribute__((always_inline))
+
+void force_inline feopp(uint64_t* out, uint64_t x9, uint64_t x10, uint64_t x8, uint64_t x6, uint64_t x4, uint64_t x2);
diff --git a/src/Specific/montgomery64_2e322m2e161m1/fesub.c b/src/Specific/montgomery64_2e322m2e161m1/fesub.c
new file mode 100644
index 000000000..e8818feb1
--- /dev/null
+++ b/src/Specific/montgomery64_2e322m2e161m1/fesub.c
@@ -0,0 +1,46 @@
+#include <stdint.h>
+#include <stdbool.h>
+#include <x86intrin.h>
+#include "liblow.h"
+
+#include "fesub.h"
+
+typedef unsigned int uint128_t __attribute__((mode(TI)));
+
+#if (defined(__GNUC__) || defined(__GNUG__)) && !(defined(__clang__)||defined(__INTEL_COMPILER))
+// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81294
+#define _subborrow_u32 __builtin_ia32_sbb_u32
+#define _subborrow_u64 __builtin_ia32_sbb_u64
+#endif
+
+#undef force_inline
+#define force_inline __attribute__((always_inline))
+
+void force_inline fesub(uint64_t* out, uint64_t x12, uint64_t x13, uint64_t x11, uint64_t x9, uint64_t x7, uint64_t x5, uint64_t x22, uint64_t x23, uint64_t x21, uint64_t x19, uint64_t x17, uint64_t x15)
+{ uint64_t x25; uint8_t x26 = _subborrow_u64(0x0, x5, x15, &x25);
+{ uint64_t x28; uint8_t x29 = _subborrow_u64(x26, x7, x17, &x28);
+{ uint64_t x31; uint8_t x32 = _subborrow_u64(x29, x9, x19, &x31);
+{ uint64_t x34; uint8_t x35 = _subborrow_u64(x32, x11, x21, &x34);
+{ uint64_t x37; uint8_t x38 = _subborrow_u64(x35, x13, x23, &x37);
+{ uint64_t x40; uint8_t x41 = _subborrow_u64(x38, x12, x22, &x40);
+{ uint64_t x42 = (uint64_t)cmovznz(x41, 0x0, 0xffffffffffffffffL);
+{ uint64_t x43 = (x42 & 0xffffffffffffffffL);
+{ uint64_t x45; uint8_t x46 = _addcarryx_u64(0x0, x25, x43, &x45);
+{ uint64_t x47 = (x42 & 0xffffffffffffffffL);
+{ uint64_t x49; uint8_t x50 = _addcarryx_u64(x46, x28, x47, &x49);
+{ uint64_t x51 = (x42 & 0xfffffffdffffffffL);
+{ uint64_t x53; uint8_t x54 = _addcarryx_u64(x50, x31, x51, &x53);
+{ uint64_t x55 = (x42 & 0xffffffffffffffffL);
+{ uint64_t x57; uint8_t x58 = _addcarryx_u64(x54, x34, x55, &x57);
+{ uint64_t x59 = (x42 & 0xffffffffffffffffL);
+{ uint64_t x61; uint8_t x62 = _addcarryx_u64(x58, x37, x59, &x61);
+{ uint8_t x63 = ((uint8_t)x42 & 0x3);
+{ uint64_t x65; uint8_t _ = _addcarryx_u64(x62, x40, x63, &x65);
+out[0] = x65;
+out[1] = x61;
+out[2] = x57;
+out[3] = x53;
+out[4] = x49;
+out[5] = x45;
+}}}}}}}}}}}}}}}}}}}
+// caller: uint64_t out[6];
diff --git a/src/Specific/montgomery64_2e322m2e161m1/fesub.h b/src/Specific/montgomery64_2e322m2e161m1/fesub.h
new file mode 100644
index 000000000..e9c4bd677
--- /dev/null
+++ b/src/Specific/montgomery64_2e322m2e161m1/fesub.h
@@ -0,0 +1,6 @@
+#include <stdint.h>
+
+#undef force_inline
+#define force_inline __attribute__((always_inline))
+
+void force_inline fesub(uint64_t* out, uint64_t x12, uint64_t x13, uint64_t x11, uint64_t x9, uint64_t x7, uint64_t x5, uint64_t x22, uint64_t x23, uint64_t x21, uint64_t x19, uint64_t x17, uint64_t x15);