aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/bitsliced-aes
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-04-03 21:59:22 +0200
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-04-03 21:59:22 +0200
commit4518486a771055e633aa050141d9721353d542d7 (patch)
tree0916e82f7229068dd492c9552c248d9d94137920 /test/monniaux/bitsliced-aes
parent104681e5db184659a36762e0776cef133d70455b (diff)
downloadcompcert-kvx-4518486a771055e633aa050141d9721353d542d7.tar.gz
compcert-kvx-4518486a771055e633aa050141d9721353d542d7.zip
ternary ops in AES and TEA
Diffstat (limited to 'test/monniaux/bitsliced-aes')
-rw-r--r--test/monniaux/bitsliced-aes/bs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/monniaux/bitsliced-aes/bs.c b/test/monniaux/bitsliced-aes/bs.c
index 9a24643c..929fd24d 100644
--- a/test/monniaux/bitsliced-aes/bs.c
+++ b/test/monniaux/bitsliced-aes/bs.c
@@ -2,8 +2,8 @@
#include <string.h>
#include "bs.h"
-#if defined(__K1C__)
-#define TERNARY(x, v0, v1) __builtin_ternary_ulong((x), (v1), (v0))
+#if defined(__K1C__) && defined(__COMPCERT__)
+#define TERNARY(x, v0, v1) __builtin_ternary_ulong((x)!=0, (v1), (v0))
#else
#define TERNARY(x, v0, v1) ((x) ? (v1) : (v0))
#endif