diff options
Diffstat (limited to 'src/Specific/Framework/bench/fibe.c')
-rw-r--r-- | src/Specific/Framework/bench/fibe.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/Specific/Framework/bench/fibe.c b/src/Specific/Framework/bench/fibe.c index 323a6071b..670722e88 100644 --- a/src/Specific/Framework/bench/fibe.c +++ b/src/Specific/Framework/bench/fibe.c @@ -76,6 +76,11 @@ static uint32_t _subborrow_u32(uint8_t c, uint32_t a, uint32_t b, uint32_t *low) return (uint8_t) (x>>63); } +static uint32_t cmovznz32(uint32_t t, uint32_t z, uint32_t nz) { + t = -!!t; + return (t&nz) | ((~t)&z); +} + #if bitwidth >= 64 static uint64_t _mulx_u64(uint64_t a, uint64_t b, uint64_t *high) { @@ -97,6 +102,11 @@ static uint64_t _subborrow_u64(uint8_t c, uint64_t a, uint64_t b, uint64_t *low) return (uint8_t) (x>>127); } +static uint64_t cmovznz64(uint64_t t, uint64_t z, uint64_t nz) { + t = -!!t; + return (t&nz) | ((~t)&z); +} + #endif #endif @@ -119,7 +129,6 @@ static uint64_t _mulx_u64_out_u8(uint64_t a, uint64_t b, uint8_t *high) { -#include "liblow.h" #include "feadd.c" #include "femul.c" #include "fesquare.c" |