From b7021853e651ddde91450cc83d3c77c5377efc06 Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Wed, 18 Apr 2018 14:27:44 +0200 Subject: MPPA - added Oaddrsymbol -> now able to run the matrix mult test --- test/mppa/mmult/.gitignore | 3 ++ test/mppa/mmult/Makefile | 74 +++++++++++++++++++++++----------------------- test/mppa/mmult/mmult.c | 2 ++ 3 files changed, 42 insertions(+), 37 deletions(-) create mode 100644 test/mppa/mmult/.gitignore (limited to 'test/mppa') diff --git a/test/mppa/mmult/.gitignore b/test/mppa/mmult/.gitignore new file mode 100644 index 00000000..5883d367 --- /dev/null +++ b/test/mppa/mmult/.gitignore @@ -0,0 +1,3 @@ +mmult-test-k1c +mmult-test-x86 +test-ccomp diff --git a/test/mppa/mmult/Makefile b/test/mppa/mmult/Makefile index 9cb5b9e7..bb4506bf 100644 --- a/test/mppa/mmult/Makefile +++ b/test/mppa/mmult/Makefile @@ -10,47 +10,47 @@ all: $(ALL) %-test-k1c: %.c $(PRNG) k1-gcc -D__UNIT_TEST_$$(echo $(basename $<) | tr a-z A-Z)__ -O2 -std=c99 $^ -o $@ -#test-x86: selection.c merge.c insertion.c test.c $(PRNG) -# gcc -g -O2 -std=c99 $^ -o $@ -# -#test-k1c: selection.c merge.c insertion.c test.c $(PRNG) -# k1-gcc -g -O2 -std=c99 $^ -o $@ -# -#%.s: %.c -# ccomp -O2 -S $< -o $@ -# -#test-ccomp: selection.s merge.s insertion.s test.s $(subst .c,.s,$(PRNG)) -# k1-gcc $^ -o $@ +test-x86: mmult.c $(PRNG) + gcc -g -O2 -std=c99 $^ -o $@ + +test-k1c: mmult.c $(PRNG) + k1-gcc -g -O2 -std=c99 $^ -o $@ + +%.s: %.c + ccomp -O2 -S $< -o $@ + +test-ccomp: mmult.s $(subst .c,.s,$(PRNG)) + k1-gcc $^ -o $@ .PHONY: unittest: unittest-x86 unittest-k1c -#.PHONY: -#check: check-x86 check-k1c - -#.PHONY: -#compc-check: test-ccomp -# @if ! k1-cluster -- ./$<; then\ -# >&2 echo "ERROR k1c: sort $< failed";\ -# else\ -# echo "k1c: Test sort $< succeeded";\ -# fi -# -#.PHONY: -#check-x86: test-x86 -# @if ! ./$<; then\ -# >&2 echo "ERROR x86: $< failed";\ -# else\ -# echo "x86: Test $< succeeded";\ -# fi -# -#.PHONY: -#check-k1c: test-k1c -# @if ! k1-cluster -- ./$<; then\ -# >&2 echo "ERROR k1c: $< failed";\ -# else\ -# echo "k1c: Test $< succeeded";\ -# fi +.PHONY: +check: check-x86 check-k1c + +.PHONY: +compc-check: test-ccomp + @if ! k1-cluster -- ./$<; then\ + >&2 echo "ERROR k1c: sort $< failed";\ + else\ + echo "k1c: Test sort $< succeeded";\ + fi + +.PHONY: +check-x86: test-x86 + @if ! ./$<; then\ + >&2 echo "ERROR x86: $< failed";\ + else\ + echo "x86: Test $< succeeded";\ + fi + +.PHONY: +check-k1c: test-k1c + @if ! k1-cluster -- ./$<; then\ + >&2 echo "ERROR k1c: $< failed";\ + else\ + echo "k1c: Test $< succeeded";\ + fi .PHONY: unittest-x86: mmult-test-x86 diff --git a/test/mppa/mmult/mmult.c b/test/mppa/mmult/mmult.c index 04ac4605..16dcf34c 100644 --- a/test/mppa/mmult/mmult.c +++ b/test/mppa/mmult/mmult.c @@ -1,6 +1,8 @@ #include "../lib/types.h" #include "../lib/prng.h" +#define __UNIT_TEST_MMULT__ + #ifdef __UNIT_TEST_MMULT__ #define SIZE 50 #else -- cgit