aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/bitsliced-aes/bs.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/monniaux/bitsliced-aes/bs.c')
-rw-r--r--test/monniaux/bitsliced-aes/bs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/monniaux/bitsliced-aes/bs.c b/test/monniaux/bitsliced-aes/bs.c
index df5c1f6b..04c155ea 100644
--- a/test/monniaux/bitsliced-aes/bs.c
+++ b/test/monniaux/bitsliced-aes/bs.c
@@ -388,11 +388,14 @@ void bs_transpose_dst(word_t * transpose, word_t * blocks)
int offset = i << MUL_SHIFT;
#ifndef UNROLL_TRANSPOSE
+ /* DM experiments */
+#define TERNARY_XY0(t, x) (((t) != 0) ? (x) : (0))
+
int j;
for(j=0; j < WORD_SIZE; j++)
{
// TODO make const time
- transpose[offset + j] |= (w & (ONE << j)) ? bitpos : 0;
+ transpose[offset + j] |= TERNARY_XY0(w & (ONE << j), bitpos);
}
#else