aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/bitsliced-aes
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-03-27 07:53:34 +0100
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-03-27 07:53:34 +0100
commit0d8f4f46407b1634fba4f6cd46ba4955a7859863 (patch)
tree72dfb5ecb3790ba5479d2603ebcbbfe8e6e56f49 /test/monniaux/bitsliced-aes
parent0a42ed2c85b0d46333633dd12bbdbe559d2531c2 (diff)
downloadcompcert-kvx-0d8f4f46407b1634fba4f6cd46ba4955a7859863.tar.gz
compcert-kvx-0d8f4f46407b1634fba4f6cd46ba4955a7859863.zip
match some 'and'
Diffstat (limited to 'test/monniaux/bitsliced-aes')
-rw-r--r--test/monniaux/bitsliced-aes/bs.c7
-rw-r--r--test/monniaux/bitsliced-aes/notes.txt13
2 files changed, 16 insertions, 4 deletions
diff --git a/test/monniaux/bitsliced-aes/bs.c b/test/monniaux/bitsliced-aes/bs.c
index 949d2a8a..5fd7450a 100644
--- a/test/monniaux/bitsliced-aes/bs.c
+++ b/test/monniaux/bitsliced-aes/bs.c
@@ -16,13 +16,12 @@ static inline word_t compcert_ternary(word_t x, word_t v0, word_t v1) {
/* with bitmask
#define TERNARY0(cmp,v1) (-(cmp != 0) & (v1))
*/
-/* with function call to ternary */
+/* with function call to ternary
#define TERNARY0(cmp,v1) compcert_ternary(cmp, 0, v1)
-
-/*
-#define TERNARY0(x, v1) ((unsigned long) (((-(((long) (x))==0)) & (0)) | ((-(((long) (x))!=0)) & (v1))))
*/
+#define TERNARY0(x, v1) ((unsigned long) ((long) (-(((long) (x))!=0)) & (v1)))
+
#if (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) ||\
defined(__amd64__) || defined(__amd32__)|| defined(__amd16__)
#define bs2le(x) (x)
diff --git a/test/monniaux/bitsliced-aes/notes.txt b/test/monniaux/bitsliced-aes/notes.txt
index e9be8b42..815d5931 100644
--- a/test/monniaux/bitsliced-aes/notes.txt
+++ b/test/monniaux/bitsliced-aes/notes.txt
@@ -36,3 +36,16 @@ cycles: 2916854
==> test.gcc.k1c.out <==
cycles: 5646730
+
+* cmove via match du and
+==> test.ccomp.host.out <==
+cycles: 2553732
+
+==> test.ccomp.k1c.out <==
+cycles: 7208629
+
+==> test.gcc.host.out <==
+cycles: 1849125
+
+==> test.gcc.k1c.out <==
+cycles: 5255763