aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/crypto-algorithms
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-01-30 05:07:24 +0100
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-01-30 05:07:24 +0100
commit09341d6d5d8543a3fbf91f56148014e225df3d88 (patch)
treebe1a3412fb0beb556c260ec546dd7128d95d3cf4 /test/monniaux/crypto-algorithms
parenta50e263ced23c213413c29732508f7514fb552bb (diff)
downloadcompcert-kvx-09341d6d5d8543a3fbf91f56148014e225df3d88.tar.gz
compcert-kvx-09341d6d5d8543a3fbf91f56148014e225df3d88.zip
blowfish
Diffstat (limited to 'test/monniaux/crypto-algorithms')
-rw-r--r--test/monniaux/crypto-algorithms/Makefile5
-rw-r--r--test/monniaux/crypto-algorithms/modulo_division.c12
2 files changed, 15 insertions, 2 deletions
diff --git a/test/monniaux/crypto-algorithms/Makefile b/test/monniaux/crypto-algorithms/Makefile
index dcc282af..d58c5a8c 100644
--- a/test/monniaux/crypto-algorithms/Makefile
+++ b/test/monniaux/crypto-algorithms/Makefile
@@ -9,6 +9,7 @@ all: md2.all md5.all sha1.all sha256.all
md2.all : md2_test.ccomp.k1c.out md2_test.gcc.k1c.out
md5.all : md5_test.ccomp.k1c.out md5_test.gcc.k1c.out
+blowfish.all : blowfish_test.ccomp.k1c.out blowfish_test.gcc.k1c.out
rot-13.all : rot-13_test.ccomp.k1c.out rot-13_test.gcc.k1c.out
sha1.all : sha1_test.ccomp.k1c.out sha1_test.gcc.k1c.out
sha256.all : sha256_test.ccomp.k1c.out sha256_test.gcc.k1c.out
@@ -33,7 +34,7 @@ sha256.all : sha256_test.ccomp.k1c.out sha256_test.gcc.k1c.out
%_test.gcc.k1c: %.gcc.k1c.o %_test.gcc.k1c.o
$(K1C_CC) $(K1C_CFLAGS) $+ -o $@
-%_test.ccomp.k1c: %.ccomp.k1c.o %_test.gcc.k1c.o
+%_test.ccomp.k1c: %.ccomp.k1c.o %_test.gcc.k1c.o modulo_division.gcc.k1c.o
$(K1C_CCOMP) $(K1C_CCOMPFLAGS) $+ -o $@
%.k1c.out: %.k1c
@@ -42,4 +43,4 @@ sha256.all : sha256_test.ccomp.k1c.out sha256_test.gcc.k1c.out
clean:
$(RM) -f *.s *.o *.out *.k1c *.host
-.PHONY: clean all md2.all md5.all rot-13.all sha1.all sha256.all
+.PHONY: clean all md2.all md5.all rot-13.all sha1.all sha256.all md5.all blowfish.all
diff --git a/test/monniaux/crypto-algorithms/modulo_division.c b/test/monniaux/crypto-algorithms/modulo_division.c
new file mode 100644
index 00000000..6f91604d
--- /dev/null
+++ b/test/monniaux/crypto-algorithms/modulo_division.c
@@ -0,0 +1,12 @@
+unsigned long long __compcert_i64_udiv(unsigned long long x, unsigned long long y) {
+ return x / y;
+}
+unsigned long long __compcert_i64_umod(unsigned long long x, unsigned long long y) {
+ return x % y;
+}
+long long __compcert_i64_sdiv(long long x, long long y) {
+ return x / y;
+}
+long long __compcert_i64_smod(long long x, long long y) {
+ return x % y;
+}