From 37a8b2a0c14082298d77f0a4858ab3402d9d1c6c Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Thu, 2 Nov 2017 02:20:52 -0400 Subject: Update display logs and c files --- src/Specific/montgomery64_2e165m25/feopp.c | 53 +++++++++++------------------- 1 file changed, 19 insertions(+), 34 deletions(-) (limited to 'src/Specific/montgomery64_2e165m25/feopp.c') 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 -#include -#include -#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; + }}}}}}}}}}}}} +} -- cgit v1.2.3