From 09341d6d5d8543a3fbf91f56148014e225df3d88 Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Wed, 30 Jan 2019 05:07:24 +0100 Subject: blowfish --- test/monniaux/crypto-algorithms/Makefile | 5 +++-- test/monniaux/crypto-algorithms/modulo_division.c | 12 ++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 test/monniaux/crypto-algorithms/modulo_division.c (limited to 'test/monniaux/crypto-algorithms') 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; +} -- cgit