aboutsummaryrefslogtreecommitdiff
path: root/src/Specific/montgomery64_2e165m25/feopp.c
diff options
context:
space:
mode:
authorGravatar Jason Gross <jgross@mit.edu>2017-11-02 02:20:52 -0400
committerGravatar Jason Gross <jgross@mit.edu>2017-11-02 02:20:52 -0400
commit37a8b2a0c14082298d77f0a4858ab3402d9d1c6c (patch)
treebd1b4c8c34485332ff15d58272efb38468ea72e5 /src/Specific/montgomery64_2e165m25/feopp.c
parent11144d2e698c4a263e59acb02226d383865f74e0 (diff)
Update display logs and c files
Diffstat (limited to 'src/Specific/montgomery64_2e165m25/feopp.c')
-rw-r--r--src/Specific/montgomery64_2e165m25/feopp.c53
1 files changed, 19 insertions, 34 deletions
diff --git a/src/Specific/montgomery64_2e165m25/feopp.c b/src/Specific/montgomery64_2e165m25/feopp.c
index 86c44bbc9..0628a94cd 100644
--- a/src/Specific/montgomery64_2e165m25/feopp.c
+++ b/src/Specific/montgomery64_2e165m25/feopp.c
@@ -1,34 +1,19 @@
-#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 x3, uint64_t x4, uint64_t x2)
-{ uint64_t x6; uint8_t x7 = _subborrow_u64(0x0, 0x0, x2, &x6);
-{ uint64_t x9; uint8_t x10 = _subborrow_u64(x7, 0x0, x4, &x9);
-{ uint64_t x12; uint8_t x13 = _subborrow_u64(x10, 0x0, x3, &x12);
-{ uint64_t x14 = (uint64_t)cmovznz(x13, 0x0, 0xffffffffffffffffL);
-{ uint64_t x15 = (x14 & 0xffffffffffffffe7L);
-{ uint64_t x17; uint8_t x18 = _addcarryx_u64(0x0, x6, x15, &x17);
-{ uint64_t x19 = (x14 & 0xffffffffffffffffL);
-{ uint64_t x21; uint8_t x22 = _addcarryx_u64(x18, x9, x19, &x21);
-{ uint64_t x23 = (x14 & 0x1fffffffff);
-{ uint64_t x25; uint8_t _ = _addcarryx_u64(x22, x12, x23, &x25);
-out[0] = x25;
-out[1] = x21;
-out[2] = x17;
-}}}}}}}}}}
-// caller: uint64_t out[3];
+static void feopp(uint64_t out[3], const uint64_t in1[3]) {
+ { const uint64_t x3 = in1[2];
+ { const uint64_t x4 = in1[1];
+ { const uint64_t x2 = in1[0];
+ { uint64_t x6; uint8_t x7 = _subborrow_u64(0x0, 0x0, x2, &x6);
+ { uint64_t x9; uint8_t x10 = _subborrow_u64(x7, 0x0, x4, &x9);
+ { uint64_t x12; uint8_t x13 = _subborrow_u64(x10, 0x0, x3, &x12);
+ { uint64_t x14 = (uint64_t)cmovznz(x13, 0x0, 0xffffffffffffffffL);
+ { uint64_t x15 = (x14 & 0xffffffffffffffe7L);
+ { uint64_t x17; uint8_t x18 = _addcarryx_u64(0x0, x6, x15, &x17);
+ { uint64_t x19 = (x14 & 0xffffffffffffffffL);
+ { uint64_t x21; uint8_t x22 = _addcarryx_u64(x18, x9, x19, &x21);
+ { uint64_t x23 = (x14 & 0x1fffffffff);
+ { uint64_t x25; uint8_t _ = _addcarryx_u64(x22, x12, x23, &x25);
+ out[0] = x17;
+ out[1] = x21;
+ out[2] = x25;
+ }}}}}}}}}}}}}
+}