aboutsummaryrefslogtreecommitdiffstats
path: root/test/mppa/instr/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'test/mppa/instr/Makefile')
-rw-r--r--test/mppa/instr/Makefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/mppa/instr/Makefile b/test/mppa/instr/Makefile
index 4129b628..69446796 100644
--- a/test/mppa/instr/Makefile
+++ b/test/mppa/instr/Makefile
@@ -5,6 +5,7 @@ CC ?= gcc
CCOMP ?= ccomp
OPTIM ?= -O2
CFLAGS ?= $(OPTIM)
+CCOMPFLAGS ?= $(CFLAGS) -faddx
SIMU ?= k1-mppa
TIMEOUT ?= --signal=SIGTERM 120s
DIFF ?= python2.7 floatcmp.py -reltol .00001
@@ -45,6 +46,7 @@ all: $(BIN)
GREEN=\033[0;32m
RED=\033[0;31m
+YELLOW=\033[0;33m
NC=\033[0m
.PHONY:
@@ -53,7 +55,9 @@ test: $(X86_GCC_OUT) $(GCC_OUT)
for test in $(TESTNAMES); do\
x86out=$(OUTDIR)/$$test.x86-gcc.out;\
gccout=$(OUTDIR)/$$test.gcc.out;\
- if $(DIFF) $$x86out $$gccout > /dev/null; test $${PIPESTATUS[0]} -ne 0; then\
+ if grep "__K1C__" -q $$test.c; then\
+ printf "$(YELLOW)UNTESTED: $$test.c contains an \`#ifdef __K1C__\`\n";\
+ elif $(DIFF) $$x86out $$gccout > /dev/null; test $${PIPESTATUS[0]} -ne 0; then\
>&2 printf "$(RED)ERROR: $$x86out and $$gccout differ$(NC)\n";\
else\
printf "$(GREEN)GOOD: $$x86out and $$gccout concur$(NC)\n";\
@@ -111,7 +115,7 @@ $(BINDIR)/%.gcc.bin: $(ASMDIR)/%.gcc.s $(K1LIB) $(K1CCPATH)
$(BINDIR)/%.ccomp.bin: $(ASMDIR)/%.ccomp.s $(K1LIB) $(CCOMPPATH)
@mkdir -p $(@D)
- $(CCOMP) $(CFLAGS) $(filter-out $(CCOMPPATH),$^) -o $@
+ $(CCOMP) $(CCOMPFLAGS) $(filter-out $(CCOMPPATH),$^) -o $@
# Source to assembly
@@ -125,4 +129,4 @@ $(ASMDIR)/%.gcc.s: $(SRCDIR)/%.c $(K1CCPATH)
$(ASMDIR)/%.ccomp.s: $(SRCDIR)/%.c $(CCOMPPATH)
@mkdir -p $(@D)
- $(CCOMP) $(CFLAGS) -S $< -o $@
+ $(CCOMP) $(CCOMPFLAGS) -S $< -o $@