From 1c264a258be01623b8936657a32f2251ca2059c1 Mon Sep 17 00:00:00 2001 From: Léo Gourdin Date: Wed, 5 Jan 2022 15:22:22 +0100 Subject: ccomp profiling --- test/abi/Makefile | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'test/abi') diff --git a/test/abi/Makefile b/test/abi/Makefile index ef354e06..ee00d4de 100644 --- a/test/abi/Makefile +++ b/test/abi/Makefile @@ -1,7 +1,7 @@ include ../../Makefile.config CCOMP=../../ccomp -stdlib ../../runtime -CCOMPFLAGS= +CCOMPFLAGS=-fstruct-passing CFLAGS=-O -Wno-overflow -Wno-constant-conversion TESTS=fixed.compcert fixed.cc2compcert fixed.compcert2cc \ @@ -17,18 +17,6 @@ all_s: fixed_def_compcert.s fixed_use_compcert.s \ vararg_def_compcert.s vararg_use_compcert.s \ struct_def_compcert.s struct_use_compcert.s -test: - @set -e; for t in $(TESTS); do \ - SIMU='$(SIMU)' ARCH=$(ARCH) MODEL=$(MODEL) ABI=$(ABI) SYSTEM=$(SYSTEM) ./Runtest $$t; \ - done - @set -e; for t in layout staticlayout; do \ - $(SIMU) ./$$t.compcert > _compcert.log; \ - $(SIMU) ./$$t.cc > _cc.log; \ - if diff -a -u _cc.log _compcert.log; \ - then echo "$$t: CompCert and $CC agree"; rm _*.log; \ - else echo "$$t: CompCert and $CC DISAGREE"; exit 2; fi; \ - done - generator.exe: generator.ml ocamlopt -g -o $@ generator.ml @@ -72,7 +60,7 @@ endif layout.h: genlayout.exe ./genlayout.exe $(GENLAYOUT_OPTIONS) > layout.h -struct%.o: CCOMPFLAGS += -fstruct-passing -dclight +struct%.o: CCOMPFLAGS +=-dclight %_compcert.o: %.c $(CCOMP) $(CCOMPFLAGS) -c -o $@ $*.c @@ -80,7 +68,7 @@ struct%.o: CCOMPFLAGS += -fstruct-passing -dclight $(CC) $(CFLAGS) -c -o $@ $*.c %_compcert.s: %.c - $(CCOMP) -S -o $@ $*.c + $(CCOMP) $(CCOMPFLAGS) -S -o $@ $*.c %_cc.s: %.c $(CC) $(CFLAGS) -S -o $@ $*.c @@ -109,3 +97,14 @@ staticlayout.cc: staticlayout.c layout.h clean:: rm -f *.[os] *.compcert *.cc2compcert *.compcert2cc *.light.c +test: + @set -e; for t in $(TESTS); do \ + SIMU='$(SIMU)' ARCH=$(ARCH) MODEL=$(MODEL) ABI=$(ABI) SYSTEM=$(SYSTEM) ./Runtest $$t; \ + done + @set -e; for t in layout staticlayout; do \ + $(SIMU) ./$$t.compcert > _compcert.log; \ + $(SIMU) ./$$t.cc > _cc.log; \ + if diff -a -u _cc.log _compcert.log; \ + then echo "$$t: CompCert and $CC agree"; rm _*.log; \ + else echo "$$t: CompCert and $CC DISAGREE"; exit 2; fi; \ + done -- cgit