aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/monniaux/bitsliced-aes/main.c2
-rw-r--r--test/monniaux/bitsliced-aes/tests/tests.c6
-rw-r--r--test/monniaux/clock.c6
-rw-r--r--test/monniaux/jpeg-6b/Makefile9
4 files changed, 16 insertions, 7 deletions
diff --git a/test/monniaux/bitsliced-aes/main.c b/test/monniaux/bitsliced-aes/main.c
index 5c730308..96d545ae 100644
--- a/test/monniaux/bitsliced-aes/main.c
+++ b/test/monniaux/bitsliced-aes/main.c
@@ -20,6 +20,8 @@
int main(int argc, char * argv[])
{
+ clock_prepare();
+
clock_start();
#ifdef RUN_TESTS
diff --git a/test/monniaux/bitsliced-aes/tests/tests.c b/test/monniaux/bitsliced-aes/tests/tests.c
index d3e464f7..d9218685 100644
--- a/test/monniaux/bitsliced-aes/tests/tests.c
+++ b/test/monniaux/bitsliced-aes/tests/tests.c
@@ -88,16 +88,14 @@ void aes_ctr_test()
printf("plain text: \n");
dump_hex(input,AES_CTR_TESTS_BYTES);
- FILE *err = fdopen(2, "w");
-
if (memcmp(pt_vector, input, AES_CTR_TESTS_BYTES) != 0)
{
- fprintf(err,"error: decrypted ciphertext is not the same as the input plaintext\n");
+ fprintf(stderr,"error: decrypted ciphertext is not the same as the input plaintext\n");
exit(1);
}
else if (memcmp(ct_vector, output, AES_CTR_TESTS_BYTES) != 0)
{
- fprintf(err,"error: ciphertext is not the same as the test vector\n");
+ fprintf(stderr,"error: ciphertext is not the same as the test vector\n");
exit(1);
}
else
diff --git a/test/monniaux/clock.c b/test/monniaux/clock.c
index 300cdc7f..e91adc99 100644
--- a/test/monniaux/clock.c
+++ b/test/monniaux/clock.c
@@ -3,6 +3,10 @@
static cycle_t total_clock, last_start;
+void clock_prepare(void) {
+ cycle_count_config();
+}
+
void clock_start(void) {
last_start = get_cycle();
}
@@ -16,5 +20,5 @@ cycle_t get_total_clock(void) {
}
void print_total_clock(void) {
- printf("cycles: %llu\n", total_clock);
+ printf("cycles: %lu\n", total_clock);
}
diff --git a/test/monniaux/jpeg-6b/Makefile b/test/monniaux/jpeg-6b/Makefile
index 68c73c30..a7911678 100644
--- a/test/monniaux/jpeg-6b/Makefile
+++ b/test/monniaux/jpeg-6b/Makefile
@@ -7,8 +7,6 @@
# The name of your C compiler:
CC= ../../../ccomp
-GCC=k1-mbr-gcc
-# GCC=$(CC)
EXECUTE=k1-cluster --syscall=libstd_scalls.so --
# You may need to adjust these cc options:
@@ -283,3 +281,10 @@ rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cde
wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
+
+.PHONY: assembly
+
+assembly: $(LIBOBJECTS:.o=.s)
+
+%s : %c
+ $(CC) -S $< -o $@