aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/bitsliced-aes
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-03-24 19:23:33 +0100
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-03-24 19:23:33 +0100
commit826a45cc9d3c1f4a12ec764c0f016c38834d1654 (patch)
treeaf5b1dec8bea34a11c23fd4d703a0ada782fa048 /test/monniaux/bitsliced-aes
parent03593590022b41b38ff1a02168d1f5ab3d6457b9 (diff)
downloadcompcert-kvx-826a45cc9d3c1f4a12ec764c0f016c38834d1654.tar.gz
compcert-kvx-826a45cc9d3c1f4a12ec764c0f016c38834d1654.zip
experiments with ternary operator
Diffstat (limited to 'test/monniaux/bitsliced-aes')
-rw-r--r--test/monniaux/bitsliced-aes/bs.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/monniaux/bitsliced-aes/bs.c b/test/monniaux/bitsliced-aes/bs.c
index 04c155ea..f48faefa 100644
--- a/test/monniaux/bitsliced-aes/bs.c
+++ b/test/monniaux/bitsliced-aes/bs.c
@@ -389,8 +389,13 @@ void bs_transpose_dst(word_t * transpose, word_t * blocks)
#ifndef UNROLL_TRANSPOSE
/* DM experiments */
+ /* The normal ternary operator costs us a lot!
+ from 10145951 to 7995063 */
+#if 1
+#define TERNARY_XY0(t, x) ((-((t) != 0)) & (x))
+#else
#define TERNARY_XY0(t, x) (((t) != 0) ? (x) : (0))
-
+#endif
int j;
for(j=0; j < WORD_SIZE; j++)
{