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/solinas32_2e171m19/freeze.c | |
parent | e8bda9b779d5762c5868cd09c85142151655d5ca (diff) |
Update display logs and c files
Diffstat (limited to 'src/Specific/solinas32_2e171m19/freeze.c')
-rw-r--r-- | src/Specific/solinas32_2e171m19/freeze.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/Specific/solinas32_2e171m19/freeze.c b/src/Specific/solinas32_2e171m19/freeze.c new file mode 100644 index 000000000..433ddce0e --- /dev/null +++ b/src/Specific/solinas32_2e171m19/freeze.c @@ -0,0 +1,25 @@ +#include <stdint.h> +#include <stdbool.h> +#include <x86intrin.h> +#include "liblow.h" + +#include "freeze.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 freeze(uint64_t* out, uint64_t x15, uint64_t x16, uint64_t x14, uint64_t x12, uint64_t x10, uint64_t x8, uint64_t x6, uint64_t x4, uint64_t x2) +out[0] = uint32_t x18; +out[1] = uint8_t x19 = Op Syntax.SubWithGetBorrow 19 Syntax.TWord 3 Syntax.TWord 5 Syntax.TWord 5 Syntax.TWord 5 Syntax.TWord 3 0x0; +out[2] = x2; +out[3] = 0x7ffed;; +} +// caller: uint64_t out[4]; |