diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-04-03 21:01:17 +0200 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-04-03 21:01:17 +0200 |
commit | 104681e5db184659a36762e0776cef133d70455b (patch) | |
tree | d0ad556679cde1526bb947ca15ee0bf740c2fc34 /test/monniaux/bitsliced-aes | |
parent | fd2c2a0bdf723dce559567324711a3127ce0582e (diff) | |
parent | 4032ed3192424a23dbb0a4f3bd2a539b22625168 (diff) | |
download | compcert-kvx-104681e5db184659a36762e0776cef133d70455b.tar.gz compcert-kvx-104681e5db184659a36762e0776cef133d70455b.zip |
Merge branch 'mppa-ternary' of gricad-gitlab.univ-grenoble-alpes.fr:sixcy/CompCert into mppa-ternary
Diffstat (limited to 'test/monniaux/bitsliced-aes')
-rw-r--r-- | test/monniaux/bitsliced-aes/bs.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/test/monniaux/bitsliced-aes/bs.c b/test/monniaux/bitsliced-aes/bs.c index 063f36f5..9a24643c 100644 --- a/test/monniaux/bitsliced-aes/bs.c +++ b/test/monniaux/bitsliced-aes/bs.c @@ -2,17 +2,8 @@ #include <string.h> #include "bs.h" - -static inline long compcert_ternary_signedl(long x, long v0, long v1) { - return ((-(x==0)) & v0) | ((-(x!=0)) & v1); -} - -static inline word_t compcert_ternary(word_t x, word_t v0, word_t v1) { - return compcert_ternary_signedl(x, v0, v1); -} - #if defined(__K1C__) -#define TERNARY(x, v0, v1) compcert_ternary((x), (v0), (v1)) +#define TERNARY(x, v0, v1) __builtin_ternary_ulong((x), (v1), (v0)) #else #define TERNARY(x, v0, v1) ((x) ? (v1) : (v0)) #endif |