From ab9060636f688ea4606ef0d9adfc9eae42e91384 Mon Sep 17 00:00:00 2001 From: Michael Hamburg Date: Fri, 20 Nov 2015 14:39:54 -0800 Subject: [PATCH] remove unused gf_subx_RAW --- src/include/field.h | 18 ------------- src/include/word.h | 66 ++++++++++++++++++++++----------------------- 2 files changed, 33 insertions(+), 51 deletions(-) diff --git a/src/include/field.h b/src/include/field.h index 1012416..6a13a92 100644 --- a/src/include/field.h +++ b/src/include/field.h @@ -14,13 +14,6 @@ #include "f_field.h" #include -#define is32 (GOLDI_BITS == 32 || GF_BITS != 448) -#if (is32) -#define IF32(s) (s) -#else -#define IF32(s) -#endif - /** * Returns 1/sqrt(+- x). * @@ -61,17 +54,6 @@ gf_sqrn ( } } -static __inline__ void -gf_subx_RAW ( - gf d, - const gf a, - const gf b -) { - gf_sub_RAW ( d, a, b ); - gf_bias( d, 2 ); - IF32( gf_weak_reduce ( d ) ); -} - static __inline__ void gf_sub ( gf d, diff --git a/src/include/word.h b/src/include/word.h index 876b2b4..0464f37 100644 --- a/src/include/word.h +++ b/src/include/word.h @@ -30,40 +30,40 @@ #endif #if (WORD_BITS == 64) -typedef uint32_t hword_t; -typedef uint64_t word_t; -typedef __uint128_t dword_t; -typedef int32_t hsword_t; -typedef int64_t sword_t; -typedef __int128_t dsword_t; -#define PRIxWORD PRIx64 -#define PRIxWORDfull "%016" PRIx64 -#define PRIxWORD56 "%014" PRIx64 -#define PRIxWORD60 "%015" PRIx60 -#define U64LE(x) x##ull -#define U58LE(x) x##ull -#define U56LE(x) x##ull -#define U60LE(x) x##ull -#define letohWORD letoh64 -#define GOLDI_BITS 64 -#define SC_LIMB(x) (x##ull) + typedef uint32_t hword_t; + typedef uint64_t word_t; + typedef __uint128_t dword_t; + typedef int32_t hsword_t; + typedef int64_t sword_t; + typedef __int128_t dsword_t; + + #define PRIxWORD PRIx64 + #define PRIxWORDfull "%016" PRIx64 + #define PRIxWORD56 "%014" PRIx64 + #define PRIxWORD60 "%015" PRIx60 + #define U64LE(x) x##ull + #define U58LE(x) x##ull + #define U56LE(x) x##ull + #define U60LE(x) x##ull + #define letohWORD letoh64 + #define SC_LIMB(x) (x##ull) #elif (WORD_BITS == 32) -typedef uint16_t hword_t; -typedef uint32_t word_t; -typedef uint64_t dword_t; -typedef int16_t hsword_t; -typedef int32_t sword_t; -typedef int64_t dsword_t; -#define PRIxWORD PRIx32 -#define PRIxWORDfull "%08" PRIx32 -#define PRIxWORD56 "%07" PRIx32 -#define U64LE(x) (x##ull)&((1ull<<32)-1), (x##ull)>>32 -#define U58LE(x) (x##ull)&((1ull<<29)-1), (x##ull)>>29 -#define U56LE(x) (x##ull)&((1ull<<28)-1), (x##ull)>>28 -#define U60LE(x) (x##ull)&((1ull<<30)-1), (x##ull)>>30 -#define letohWORD letoh32 -#define GOLDI_BITS 32 -#define SC_LIMB(x) (x##ull) + typedef uint16_t hword_t; + typedef uint32_t word_t; + typedef uint64_t dword_t; + typedef int16_t hsword_t; + typedef int32_t sword_t; + typedef int64_t dsword_t; + + #define PRIxWORD PRIx32 + #define PRIxWORDfull "%08" PRIx32 + #define PRIxWORD56 "%07" PRIx32 + #define U64LE(x) (x##ull)&((1ull<<32)-1), (x##ull)>>32 + #define U58LE(x) (x##ull)&((1ull<<29)-1), (x##ull)>>29 + #define U56LE(x) (x##ull)&((1ull<<28)-1), (x##ull)>>28 + #define U60LE(x) (x##ull)&((1ull<<30)-1), (x##ull)>>30 + #define letohWORD letoh32 + #define SC_LIMB(x) (x##ull) #else #error "For now, libdecaf only supports 32- and 64-bit architectures." #endif