aboutsummaryrefslogtreecommitdiffstats
path: root/test/mppa
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2018-08-14 10:33:40 +0200
committerCyril SIX <cyril.six@kalray.eu>2018-08-14 10:33:40 +0200
commit0b86431038c1e874d7d7030ab41a8f56b0a9991f (patch)
treea40cb9cb0e1c7641367eb637f4dee2728973d8ef /test/mppa
parent080875012a740b9fbe9ad9e1d147543ce538a955 (diff)
downloadcompcert-kvx-0b86431038c1e874d7d7030ab41a8f56b0a9991f.tar.gz
compcert-kvx-0b86431038c1e874d7d7030ab41a8f56b0a9991f.zip
Added some comments on the Makefile
Diffstat (limited to 'test/mppa')
-rw-r--r--test/mppa/Makefile24
1 files changed, 22 insertions, 2 deletions
diff --git a/test/mppa/Makefile b/test/mppa/Makefile
index 5b312475..22f22945 100644
--- a/test/mppa/Makefile
+++ b/test/mppa/Makefile
@@ -4,7 +4,6 @@ ASMDIR=asm
TESTNAMES=$(notdir $(subst .c,,$(wildcard $(DIR)/*.c)))
CCOMP=../../ccomp
-#TESTS=$(addprefix $(DIR)/,$(TESTNAMES))
ELF=$(addprefix $(DIR)/$(BINDIR)/,$(addsuffix .bin,$(TESTNAMES)))
TOK=$(addprefix $(DIR)/$(BINDIR)/,$(addsuffix .tok,$(TESTNAMES)))
ASM=$(addprefix $(DIR)/$(ASMDIR)/,$(addsuffix .s,$(TESTNAMES)))
@@ -15,19 +14,32 @@ all: $(ELF)
nobin: $(ASM)
+##
+# Assembling CompCert's assembly file
+##
$(DIR)/$(BINDIR)/%.bin: $(DIR)/$(ASMDIR)/%.s
@mkdir -p $(@D)
ccomp $< -o $@
+##
+# Compiling the C file with CompCert
+##
.SECONDARY:
$(DIR)/$(ASMDIR)/%.s: $(DIR)/%.c $(CCOMP)
@mkdir -p $(@D)
ccomp $(DEBUG) -O0 -v -S $< -o $@
+##
+# A token (.tok) is created if the .bin (created by CompCert) yields the same
+# result as the .bin.exp (created by executing the binary compiled with gcc)
+##
$(DIR)/$(BINDIR)/%.tok: $(DIR)/$(BINDIR)/%.bin $(DIR)/output/%.bin.exp
@mkdir -p $(@D)
@bash check.sh $< $@
+##
+# Generate .bin.exp : compile with gcc, execute, store the result in .bin.exp
+##
$(DIR)/output/%.bin.exp: $(DIR)/%.c
@bash generate.sh $< $@
@@ -37,15 +49,23 @@ FORCE:
.PHONY: check
check: $(TOK) sort mmult
+##
+# A utility displaying which of the pseudo-instructions are covered in the tests
+##
.PHONY: coverage
coverage: $(ASM)
bash coverage.sh $(DIR)/$(ASMDIR)
-
+##
+# Different versions of a sorting algorithm
+##
.PHONY: sort
sort: FORCE
(cd sort && make compc-check)
+##
+# Different versions of a matrix multiply
+##
.PHONY: mmult
mmult: FORCE
(cd mmult && make compc-check)