diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-06-07 19:55:35 +0200 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-06-07 19:55:35 +0200 |
commit | 8ff3b057eae4584dc893186707edf1f07e38f2c7 (patch) | |
tree | a492fd919ec3851b5a07cdc6a54b788c0717e8e9 | |
parent | ff07cea79ffb71356d7bf799eb415333599a0ae5 (diff) | |
download | compcert-kvx-8ff3b057eae4584dc893186707edf1f07e38f2c7.tar.gz compcert-kvx-8ff3b057eae4584dc893186707edf1f07e38f2c7.zip |
for zlib
-rwxr-xr-x | test/monniaux/genmake.py | 2 | ||||
-rwxr-xr-x | test/monniaux/vocabulary.sh | 2 | ||||
-rw-r--r-- | test/monniaux/zlib-1.2.11/Makefile | 18 | ||||
-rw-r--r-- | test/monniaux/zlib-1.2.11/minigzip.c | 14 |
4 files changed, 34 insertions, 2 deletions
diff --git a/test/monniaux/genmake.py b/test/monniaux/genmake.py index 16e269e3..320afdb4 100755 --- a/test/monniaux/genmake.py +++ b/test/monniaux/genmake.py @@ -77,7 +77,7 @@ def print_rule(env: Env, optim: Optim) -> None: .format(product = make_product(env, optim), sources = make_sources(env, optim), clock = make_clock(env, optim)) + " ".join([make_obj(objdep["name"], env, (objdep["compiler"] if objdep["compiler"] != "both" else env.compiler.short)) for objdep in objdeps])) - print(" {compiler} {flags} $+ -o $@" + print(" {compiler} {flags} $+ -lm -o $@" .format(compiler = env.compiler.full, flags = optim.full)) def make_env_list(envs: List[Env]) -> str: diff --git a/test/monniaux/vocabulary.sh b/test/monniaux/vocabulary.sh new file mode 100755 index 00000000..5b76921e --- /dev/null +++ b/test/monniaux/vocabulary.sh @@ -0,0 +1,2 @@ +cat *.gcc.k1c.s|cut -f2|cut -d' ' -f1|sort -u|grep -v ':'|grep -v -F '.' > gcc_vocabulary.txt +cat *.ccomp.k1c.s|cut -f2|cut -d' ' -f1|sort -u|grep -v ':'|grep -v -F '.' > ccomp_vocabulary.txt diff --git a/test/monniaux/zlib-1.2.11/Makefile b/test/monniaux/zlib-1.2.11/Makefile index 933ac56a..202f2ea4 100644 --- a/test/monniaux/zlib-1.2.11/Makefile +++ b/test/monniaux/zlib-1.2.11/Makefile @@ -1,3 +1,4 @@ +ALL_CCOMPFLAGS = -faddx ALL_CFLAGS = -D_POSIX_C_SOURCE=2 -D_LARGEFILE64_SOURCE=1 -U__STRICT_ANSI__ include ../rules.mk @@ -27,6 +28,23 @@ measures.csv: $(PRODUCTS_OUT) echo "benches, gcc host,ccomp host,gcc k1c,gcc o1 k1c,ccomp k1c" > $@ echo "zlib ", $$(grep 'cycles' minigzip.gcc.host.out | cut -d':' -f2), $$(grep 'cycles' minigzip.ccomp.host.out | cut -d':' -f2), $$(grep 'cycles' minigzip.gcc.k1c.out | cut -d':' -f2), $$(grep 'cycles' minigzip.gcc.o1.k1c.out | cut -d':' -f2), $$(grep 'cycles' minigzip.ccomp.k1c.out | cut -d':' -f2)>> $@ +SAMPLE_FILE=zlib.h + +minigzip.gcc.host.out minigzip.gcc.host.output: minigzip.gcc.host + ./$< < $(SAMPLE_FILE) > $<.output 2> $@ + +minigzip.ccomp.host.out minigzip.ccomp.host.output: minigzip.ccomp.host + ./$< < $(SAMPLE_FILE) > $<.output 2> $@ + +minigzip.gcc.k1c.out minigzip.gcc.k1c.output: minigzip.gcc.k1c + $(EXECUTE_CYCLES) $< < $(SAMPLE_FILE) > $<.output 2> $@ + +minigzip.gcc.o1.k1c.out minigzip.gcc.o1.k1c.output: minigzip.gcc.o1.k1c + $(EXECUTE_CYCLES) $< < $(SAMPLE_FILE) > $<.output 2> $@ + +minigzip.ccomp.k1c.out minigzip.ccomp.k1c.output: minigzip.ccomp.k1c + $(EXECUTE_CYCLES) $< < $(SAMPLE_FILE) > $<.output 2> $@ + .SECONDARY: .PHONY: diff --git a/test/monniaux/zlib-1.2.11/minigzip.c b/test/monniaux/zlib-1.2.11/minigzip.c index e22fb08c..0a88f14b 100644 --- a/test/monniaux/zlib-1.2.11/minigzip.c +++ b/test/monniaux/zlib-1.2.11/minigzip.c @@ -15,6 +15,11 @@ /* @(#) $Id$ */ +#define VERIMAG +#ifdef VERIMAG +#include "../clock.h" +#endif + #include "zlib.h" #include <stdio.h> @@ -611,7 +616,15 @@ int main(argc, argv) } else { file = gzdopen(fileno(stdout), outmode); if (file == NULL) error("can't gzdopen stdout"); +#ifdef VERIMAG + clock_prepare(); + clock_start(); +#endif gz_compress(stdin, file); +#ifdef VERIMAG + clock_stop(); + printerr_total_clock(); +#endif } } else { if (copyout) { @@ -637,7 +650,6 @@ int main(argc, argv) } else { file = gzdopen(fileno(stdout), outmode); if (file == NULL) error("can't gzdopen stdout"); - gz_compress(in, file); } |