diff options
author | 2017-11-02 01:36:04 -0400 | |
---|---|---|
committer | 2017-11-02 01:36:04 -0400 | |
commit | 5b45aa93efa19d54e50299ff0df8ee46c60f891b (patch) | |
tree | 9cea98ab783f557b5cbca0456a4dc3b4498e43c5 /src/Specific/montgomery64_2e291m19/feopp.c | |
parent | e8bda9b779d5762c5868cd09c85142151655d5ca (diff) |
Update display logs and c files
Diffstat (limited to 'src/Specific/montgomery64_2e291m19/feopp.c')
-rw-r--r-- | src/Specific/montgomery64_2e291m19/feopp.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/Specific/montgomery64_2e291m19/feopp.c b/src/Specific/montgomery64_2e291m19/feopp.c new file mode 100644 index 000000000..34d8efd27 --- /dev/null +++ b/src/Specific/montgomery64_2e291m19/feopp.c @@ -0,0 +1,42 @@ +#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 x7, uint64_t x8, uint64_t x6, uint64_t x4, uint64_t x2) +{ uint64_t x10; uint8_t x11 = _subborrow_u64(0x0, 0x0, x2, &x10); +{ uint64_t x13; uint8_t x14 = _subborrow_u64(x11, 0x0, x4, &x13); +{ uint64_t x16; uint8_t x17 = _subborrow_u64(x14, 0x0, x6, &x16); +{ uint64_t x19; uint8_t x20 = _subborrow_u64(x17, 0x0, x8, &x19); +{ uint64_t x22; uint8_t x23 = _subborrow_u64(x20, 0x0, x7, &x22); +{ uint64_t x24 = (uint64_t)cmovznz(x23, 0x0, 0xffffffffffffffffL); +{ uint64_t x25 = (x24 & 0xffffffffffffffedL); +{ uint64_t x27; uint8_t x28 = _addcarryx_u64(0x0, x10, x25, &x27); +{ uint64_t x29 = (x24 & 0xffffffffffffffffL); +{ uint64_t x31; uint8_t x32 = _addcarryx_u64(x28, x13, x29, &x31); +{ uint64_t x33 = (x24 & 0xffffffffffffffffL); +{ uint64_t x35; uint8_t x36 = _addcarryx_u64(x32, x16, x33, &x35); +{ uint64_t x37 = (x24 & 0xffffffffffffffffL); +{ uint64_t x39; uint8_t x40 = _addcarryx_u64(x36, x19, x37, &x39); +{ uint64_t x41 = (x24 & 0x7ffffffff); +{ uint64_t x43; uint8_t _ = _addcarryx_u64(x40, x22, x41, &x43); +out[0] = x43; +out[1] = x39; +out[2] = x35; +out[3] = x31; +out[4] = x27; +}}}}}}}}}}}}}}}} +// caller: uint64_t out[5]; |