From c41b15668a100dbfc601cf3e1991476b2439513e Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Fri, 5 Apr 2019 15:30:52 +0200 Subject: ternary op version of bitsliced TEA --- test/monniaux/bitsliced-tea/bstea.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'test/monniaux/bitsliced-tea') diff --git a/test/monniaux/bitsliced-tea/bstea.h b/test/monniaux/bitsliced-tea/bstea.h index 0ebb2f17..9ca4f776 100644 --- a/test/monniaux/bitsliced-tea/bstea.h +++ b/test/monniaux/bitsliced-tea/bstea.h @@ -5,11 +5,16 @@ #include #include "bstea_wordsize.h" - -#if 0 /* defined(__K1C__) && defined(__COMPCERT__) */ -#define TERNARY(x, v1, v0) __builtin_ternary_ulong((x)!=0, (v1), (v0)) -#else +#include "../ternary.h" +/* #define TERNARY(x, v1, v0) ((x) ? (v1) : (v0)) +*/ +#if __BSTEA_WORDSIZE==64 +#define TERNARY(x, v1, v0) TERNARY64(x, v1, v0) +#elif __BSTEA_WORDSIZE==32 +#define TERNARY(x, v1, v0) TERNARY32(x, v1, v0) +#else +#error What is the bit size !? #endif #define TEA_ROUNDS 32 -- cgit