From 826a45cc9d3c1f4a12ec764c0f016c38834d1654 Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Sun, 24 Mar 2019 19:23:33 +0100 Subject: experiments with ternary operator --- test/monniaux/bitsliced-aes/bs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'test/monniaux/bitsliced-aes') 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++) { -- cgit