aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2019-07-17 12:03:39 +0200
committerCyril SIX <cyril.six@kalray.eu>2019-07-17 12:03:39 +0200
commitb288b587378984c3c419d26a13dcf93686d1b779 (patch)
tree623679ad5dd5325f4d0d11d2d85d43a638d9ad33 /test/monniaux
parentc1330c1f6863d4029bfa965b4151e629d72a2217 (diff)
downloadcompcert-kvx-b288b587378984c3c419d26a13dcf93686d1b779.tar.gz
compcert-kvx-b288b587378984c3c419d26a13dcf93686d1b779.zip
All working benches ported
Diffstat (limited to 'test/monniaux')
-rw-r--r--test/monniaux/complex/complex_mat.c6
-rw-r--r--test/monniaux/glibc_qsort/glibc_qsort_run.c2
-rw-r--r--test/monniaux/heapsort/heapsort_run.c2
-rw-r--r--test/monniaux/heptagon_radio_transmitter/Makefile3
-rw-r--r--test/monniaux/heptagon_radio_transmitter/make.proto3
-rw-r--r--test/monniaux/lustrev4_lustrec_heater_control/Makefile3
-rw-r--r--test/monniaux/lustrev4_lustrec_heater_control/make.proto3
-rw-r--r--test/monniaux/lustrev4_lv4_heater_control/Makefile3
-rw-r--r--test/monniaux/lustrev4_lv6-en-2cgc_heater_control/Makefile3
-rw-r--r--test/monniaux/lustrev4_lv6-en-2cgc_heater_control/make.proto3
-rw-r--r--test/monniaux/lustrev6-convertible-en-2cgc/Makefile3
-rw-r--r--test/monniaux/lustrev6-convertible-en-2cgc/make.proto3
-rw-r--r--test/monniaux/quicksort/Makefile3
-rw-r--r--test/monniaux/quicksort/make.proto3
-rw-r--r--test/monniaux/quicksort/quicksort_run.c2
-rw-r--r--test/monniaux/rules.mk6
-rw-r--r--test/monniaux/sha-2/Makefile3
-rw-r--r--test/monniaux/sha-2/make.proto3
-rw-r--r--test/monniaux/sha-2/sha-256_run.c2
-rw-r--r--test/monniaux/tacle-bench-lift/Makefile4
-rw-r--r--test/monniaux/tacle-bench-lift/make.proto4
-rw-r--r--test/monniaux/tacle-bench-powerwindow/Makefile4
-rw-r--r--test/monniaux/tacle-bench-powerwindow/make.proto4
-rw-r--r--test/monniaux/too_slow/Makefile3
-rw-r--r--test/monniaux/too_slow/make.proto3
-rw-r--r--test/monniaux/xor_and_mat/Makefile4
-rw-r--r--test/monniaux/xor_and_mat/int_mat_run.c14
-rw-r--r--test/monniaux/xor_and_mat/make.proto3
28 files changed, 53 insertions, 49 deletions
diff --git a/test/monniaux/complex/complex_mat.c b/test/monniaux/complex/complex_mat.c
index b7103f60..9ce4fd23 100644
--- a/test/monniaux/complex/complex_mat.c
+++ b/test/monniaux/complex/complex_mat.c
@@ -227,9 +227,9 @@ int main() {
printf("c1==c8: %s\n"
"c1==c9: %s\n"
- "c1_time : %" PRIu64 "\n"
- "c8_time : %" PRIu64 "\n"
- "c9_time : %" PRIu64 "\n",
+ "c1 : %" PRIu64 "\n"
+ "c8 : %" PRIu64 "\n"
+ "c9 : %" PRIu64 "\n",
COMPLEX_mat_equal(m, n, c1, p, c8, p)?"true":"false",
COMPLEX_mat_equal(m, n, c1, p, c9, p)?"true":"false",
diff --git a/test/monniaux/glibc_qsort/glibc_qsort_run.c b/test/monniaux/glibc_qsort/glibc_qsort_run.c
index 7fcb8130..fee5a2ff 100644
--- a/test/monniaux/glibc_qsort/glibc_qsort_run.c
+++ b/test/monniaux/glibc_qsort/glibc_qsort_run.c
@@ -41,7 +41,7 @@ int main (void) {
quicksort(vec, len, sizeof(data), data_compare, NULL);
quicksort_time = get_cycle() - quicksort_time;
printf("sorted=%s\n"
- "quicksort_time:%" PRIu64 "\n",
+ "time cycles:%" PRIu64 "\n",
data_vec_is_sorted(vec, len)?"true":"false",
quicksort_time);
free(vec);
diff --git a/test/monniaux/heapsort/heapsort_run.c b/test/monniaux/heapsort/heapsort_run.c
index 053822a3..8f2d3fe0 100644
--- a/test/monniaux/heapsort/heapsort_run.c
+++ b/test/monniaux/heapsort/heapsort_run.c
@@ -13,7 +13,7 @@ int main (void) {
heapsort(vec, len);
heapsort_time = get_cycle() - heapsort_time;
printf("sorted=%s\n"
- "heapsort_time:%" PRIu64 "\n",
+ "time cycles:%" PRIu64 "\n",
data_vec_is_sorted(vec, len)?"true":"false",
heapsort_time);
free(vec);
diff --git a/test/monniaux/heptagon_radio_transmitter/Makefile b/test/monniaux/heptagon_radio_transmitter/Makefile
new file mode 100644
index 00000000..75420a10
--- /dev/null
+++ b/test/monniaux/heptagon_radio_transmitter/Makefile
@@ -0,0 +1,3 @@
+TARGET=radiotrans
+
+include ../rules.mk
diff --git a/test/monniaux/heptagon_radio_transmitter/make.proto b/test/monniaux/heptagon_radio_transmitter/make.proto
deleted file mode 100644
index 40de14dc..00000000
--- a/test/monniaux/heptagon_radio_transmitter/make.proto
+++ /dev/null
@@ -1,3 +0,0 @@
-sources: "$(wildcard *.c)"
-target: radiotrans
-measures: [cycles]
diff --git a/test/monniaux/lustrev4_lustrec_heater_control/Makefile b/test/monniaux/lustrev4_lustrec_heater_control/Makefile
new file mode 100644
index 00000000..df7c9e0a
--- /dev/null
+++ b/test/monniaux/lustrev4_lustrec_heater_control/Makefile
@@ -0,0 +1,3 @@
+TARGET=lustrec_heater_control
+
+include ../rules.mk
diff --git a/test/monniaux/lustrev4_lustrec_heater_control/make.proto b/test/monniaux/lustrev4_lustrec_heater_control/make.proto
deleted file mode 100644
index ccb0e684..00000000
--- a/test/monniaux/lustrev4_lustrec_heater_control/make.proto
+++ /dev/null
@@ -1,3 +0,0 @@
-sources: "$(wildcard *.c)"
-target: lustrec_heater_control
-measures: [cycles]
diff --git a/test/monniaux/lustrev4_lv4_heater_control/Makefile b/test/monniaux/lustrev4_lv4_heater_control/Makefile
new file mode 100644
index 00000000..cfd37921
--- /dev/null
+++ b/test/monniaux/lustrev4_lv4_heater_control/Makefile
@@ -0,0 +1,3 @@
+TARGET=lv4_heater_control
+
+include ../rules.mk
diff --git a/test/monniaux/lustrev4_lv6-en-2cgc_heater_control/Makefile b/test/monniaux/lustrev4_lv6-en-2cgc_heater_control/Makefile
new file mode 100644
index 00000000..90d0a4c9
--- /dev/null
+++ b/test/monniaux/lustrev4_lv6-en-2cgc_heater_control/Makefile
@@ -0,0 +1,3 @@
+TARGET=lv6-en-2cgc_heater_control
+
+include ../rules.mk
diff --git a/test/monniaux/lustrev4_lv6-en-2cgc_heater_control/make.proto b/test/monniaux/lustrev4_lv6-en-2cgc_heater_control/make.proto
deleted file mode 100644
index ac398d0e..00000000
--- a/test/monniaux/lustrev4_lv6-en-2cgc_heater_control/make.proto
+++ /dev/null
@@ -1,3 +0,0 @@
-sources: "$(wildcard *.c)"
-target: lv6-en-2cgc_heater_control
-measures: [cycles]
diff --git a/test/monniaux/lustrev6-convertible-en-2cgc/Makefile b/test/monniaux/lustrev6-convertible-en-2cgc/Makefile
new file mode 100644
index 00000000..009f7f35
--- /dev/null
+++ b/test/monniaux/lustrev6-convertible-en-2cgc/Makefile
@@ -0,0 +1,3 @@
+TARGET=lv6-en-2cgc_convertible
+
+include ../rules.mk
diff --git a/test/monniaux/lustrev6-convertible-en-2cgc/make.proto b/test/monniaux/lustrev6-convertible-en-2cgc/make.proto
deleted file mode 100644
index f73538f6..00000000
--- a/test/monniaux/lustrev6-convertible-en-2cgc/make.proto
+++ /dev/null
@@ -1,3 +0,0 @@
-sources: "$(wildcard *.c)"
-target: lv6-en-2cgc_convertible
-measures: [cycles]
diff --git a/test/monniaux/quicksort/Makefile b/test/monniaux/quicksort/Makefile
new file mode 100644
index 00000000..719cd755
--- /dev/null
+++ b/test/monniaux/quicksort/Makefile
@@ -0,0 +1,3 @@
+TARGET=quicksort
+
+include ../rules.mk
diff --git a/test/monniaux/quicksort/make.proto b/test/monniaux/quicksort/make.proto
deleted file mode 100644
index fe2f906b..00000000
--- a/test/monniaux/quicksort/make.proto
+++ /dev/null
@@ -1,3 +0,0 @@
-objdeps: [{name: quicksort_run, compiler: gcc}]
-target: quicksort
-measures: [quicksort_time]
diff --git a/test/monniaux/quicksort/quicksort_run.c b/test/monniaux/quicksort/quicksort_run.c
index 88747d17..c35d0752 100644
--- a/test/monniaux/quicksort/quicksort_run.c
+++ b/test/monniaux/quicksort/quicksort_run.c
@@ -13,7 +13,7 @@ int main (void) {
quicksort(vec, len);
quicksort_time = get_cycle() - quicksort_time;
printf("sorted=%s\n"
- "quicksort_time:%" PRIu64 "\n",
+ "time cycles:%" PRIu64 "\n",
data_vec_is_sorted(vec, len)?"true":"false",
quicksort_time);
free(vec);
diff --git a/test/monniaux/rules.mk b/test/monniaux/rules.mk
index 9fd20a3d..f65dc414 100644
--- a/test/monniaux/rules.mk
+++ b/test/monniaux/rules.mk
@@ -14,10 +14,10 @@ CLOCK=../clock
MAX_MEASURES=10
# Flags common to both compilers, then to gcc, then to ccomp
-ALL_CFLAGS=-Wall -D__K1C_COS__ -DMAX_MEASURES=$(MAX_MEASURES)
+ALL_CFLAGS+=-Wall -D__K1C_COS__ -DMAX_MEASURES=$(MAX_MEASURES)
#ALL_CFLAGS+=-g
-ALL_GCCFLAGS=$(ALL_CFLAGS) -std=c99 -Wextra -Werror=implicit
-ALL_CCOMPFLAGS=$(ALL_CFLAGS)
+ALL_GCCFLAGS+=$(ALL_CFLAGS) -std=c99 -Wextra -Werror=implicit
+ALL_CCOMPFLAGS+=$(ALL_CFLAGS)
# The compilers
K1C_CC=k1-cos-gcc
diff --git a/test/monniaux/sha-2/Makefile b/test/monniaux/sha-2/Makefile
new file mode 100644
index 00000000..a043d89f
--- /dev/null
+++ b/test/monniaux/sha-2/Makefile
@@ -0,0 +1,3 @@
+TARGET=sha-256
+
+include ../rules.mk
diff --git a/test/monniaux/sha-2/make.proto b/test/monniaux/sha-2/make.proto
deleted file mode 100644
index f776565e..00000000
--- a/test/monniaux/sha-2/make.proto
+++ /dev/null
@@ -1,3 +0,0 @@
-objdeps: [{name: sha-256_run, compiler: gcc}]
-target: sha-256
-measures: ["total cycles"]
diff --git a/test/monniaux/sha-2/sha-256_run.c b/test/monniaux/sha-2/sha-256_run.c
index 05a69d6b..1b6f7372 100644
--- a/test/monniaux/sha-2/sha-256_run.c
+++ b/test/monniaux/sha-2/sha-256_run.c
@@ -280,6 +280,6 @@ int main(void)
}
}
destruct_binary_messages();
- printf("total cycles : %" PRIu64 "\n", cycle_total);
+ printf("time cycles: %" PRIu64 "\n", cycle_total);
return 0;
}
diff --git a/test/monniaux/tacle-bench-lift/Makefile b/test/monniaux/tacle-bench-lift/Makefile
new file mode 100644
index 00000000..2e1db080
--- /dev/null
+++ b/test/monniaux/tacle-bench-lift/Makefile
@@ -0,0 +1,4 @@
+ALL_CFLAGS:=-include kill_pragma.h
+TARGET=lift
+
+include ../rules.mk
diff --git a/test/monniaux/tacle-bench-lift/make.proto b/test/monniaux/tacle-bench-lift/make.proto
deleted file mode 100644
index e9667b47..00000000
--- a/test/monniaux/tacle-bench-lift/make.proto
+++ /dev/null
@@ -1,4 +0,0 @@
-intro: "ALL_CFLAGS = -include kill_pragma.h"
-sources: "lift.c liftlibcontrol.c liftlibio.c"
-target: lift
-measures: [cycles]
diff --git a/test/monniaux/tacle-bench-powerwindow/Makefile b/test/monniaux/tacle-bench-powerwindow/Makefile
new file mode 100644
index 00000000..3417cd4c
--- /dev/null
+++ b/test/monniaux/tacle-bench-powerwindow/Makefile
@@ -0,0 +1,4 @@
+ALL_CFLAGS:=-include kill_pragma.h
+TARGET=powerwindow
+
+include ../rules.mk
diff --git a/test/monniaux/tacle-bench-powerwindow/make.proto b/test/monniaux/tacle-bench-powerwindow/make.proto
deleted file mode 100644
index c4be5f05..00000000
--- a/test/monniaux/tacle-bench-powerwindow/make.proto
+++ /dev/null
@@ -1,4 +0,0 @@
-intro: "ALL_CFLAGS = -include kill_pragma.h"
-sources: "$(wildcard *.c)"
-target: powerwindow
-measures: [cycles]
diff --git a/test/monniaux/too_slow/Makefile b/test/monniaux/too_slow/Makefile
new file mode 100644
index 00000000..a1466d1d
--- /dev/null
+++ b/test/monniaux/too_slow/Makefile
@@ -0,0 +1,3 @@
+TARGET=memset_from_bitslices-aes
+
+include ../rules.mk
diff --git a/test/monniaux/too_slow/make.proto b/test/monniaux/too_slow/make.proto
deleted file mode 100644
index 852971fc..00000000
--- a/test/monniaux/too_slow/make.proto
+++ /dev/null
@@ -1,3 +0,0 @@
-target: memset_from_bitsliced-aes
-measures: [cycles]
-name: memset-aes
diff --git a/test/monniaux/xor_and_mat/Makefile b/test/monniaux/xor_and_mat/Makefile
new file mode 100644
index 00000000..e6c4db77
--- /dev/null
+++ b/test/monniaux/xor_and_mat/Makefile
@@ -0,0 +1,4 @@
+TARGET=xor_and_mat
+MEASURES="c1 c2 c3 c4 c5 c6 c7"
+
+include ../rules.mk
diff --git a/test/monniaux/xor_and_mat/int_mat_run.c b/test/monniaux/xor_and_mat/int_mat_run.c
index cd902bca..a6a821d9 100644
--- a/test/monniaux/xor_and_mat/int_mat_run.c
+++ b/test/monniaux/xor_and_mat/int_mat_run.c
@@ -54,13 +54,13 @@ int main() {
"c1==c5: %s\n"
"c1==c6: %s\n"
"c1==c7: %s\n"
- "c1_time : %" PRIu64 "\n"
- "c2_time : %" PRIu64 "\n"
- "c3_time : %" PRIu64 "\n"
- "c4_time : %" PRIu64 "\n"
- "c5_time : %" PRIu64 "\n"
- "c6_time : %" PRIu64 "\n"
- "c7_time : %" PRIu64 "\n",
+ "c1 cycles: %" PRIu64 "\n"
+ "c2 cycles: %" PRIu64 "\n"
+ "c3 cycles: %" PRIu64 "\n"
+ "c4 cycles: %" PRIu64 "\n"
+ "c5 cycles: %" PRIu64 "\n"
+ "c6 cycles: %" PRIu64 "\n"
+ "c7 cycles: %" PRIu64 "\n",
xor_and_mat_equal(m, n, c1, p, c2, p)?"true":"false",
xor_and_mat_equal(m, n, c1, p, c3, p)?"true":"false",
diff --git a/test/monniaux/xor_and_mat/make.proto b/test/monniaux/xor_and_mat/make.proto
deleted file mode 100644
index 0c2f3dc1..00000000
--- a/test/monniaux/xor_and_mat/make.proto
+++ /dev/null
@@ -1,3 +0,0 @@
-sources: int_mat_run.c int_mat.c
-target: xor_and_mat
-measures: [[c2_time, c2], [c7_time, c7]]