diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-04-05 15:30:52 +0200 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-04-05 15:30:52 +0200 |
commit | c41b15668a100dbfc601cf3e1991476b2439513e (patch) | |
tree | 24ce2e4fd50e839d372e5d5b2031e3c542a4ba00 /test/monniaux | |
parent | b57f2582b5d2e05c2e4f7fcb0742a079d85b5407 (diff) | |
download | compcert-kvx-c41b15668a100dbfc601cf3e1991476b2439513e.tar.gz compcert-kvx-c41b15668a100dbfc601cf3e1991476b2439513e.zip |
ternary op version of bitsliced TEA
Diffstat (limited to 'test/monniaux')
-rw-r--r-- | test/monniaux/bitsliced-tea/bstea.h | 13 |
1 files changed, 9 insertions, 4 deletions
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 <limits.h> #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 |