From aedc724419e2b9b96cddcddc3388df96a2284087 Mon Sep 17 00:00:00 2001 From: Alistair Michael Date: Tue, 4 Jun 2024 17:26:18 +1000 Subject: [PATCH] re-lifting from gts --- src/test/Makefile | 4 ++-- src/test/make/lift-directories.mk | 3 ++- src/test/make/lift.mk | 11 +++++++---- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/test/Makefile b/src/test/Makefile index 77710cd3c..e5de7bf72 100644 --- a/src/test/Makefile +++ b/src/test/Makefile @@ -1,11 +1,11 @@ -TARGETSS := all verify clean cleanall cleanlift recompile json cleanjson cleangts gts +TARGETSS := all verify clean cleanall cleanlift recompile json cleanjson cleangts gts reliftgts SUBTARGETS = $(wildcard correct/*/ incorrect/*/ correct_analyse/*/) .PHONY : $(TARGETSS) $(SUBTARGETS) correct incorrect $(TARGETSS): $(SUBTARGETS) -correct: $(realpath $(wildcard correct/*)) +correct: $(realpath $(wildcard correct/*)) $(realpath $(wildcard correct_analyse/*)) incorrect: $(realpath $(wildcard incorrect/*)) $(SUBTARGETS): diff --git a/src/test/make/lift-directories.mk b/src/test/make/lift-directories.mk index 2e9788df5..b26daec50 100644 --- a/src/test/make/lift-directories.mk +++ b/src/test/make/lift-directories.mk @@ -10,6 +10,7 @@ GIT_ROOT?=$(realpath ../../../../) GCC ?= aarch64-linux-gnu-gcc CLANG ?= clang-15 -target $(TARGET) +GTIRB_SEMANTICS ?= gtirb_semantics CC ?= $(GCC) #CFLAGS=-fno-pic -fno-plt TARGET=aarch64-linux-gnu @@ -29,7 +30,7 @@ LIFT_ARTEFACTS=$(NAME).adt $(NAME).bir $(NAME).relf $(NAME).gts ENABLED_COMPILERS ?= clang clang_O2 clang_pic clang_no_plt_no_pic gcc gcc_O2 gcc_no_plt_no_pic gcc_pic -TARGETS := all verify clean cleanall cleanlift cleanjson cleangts cleantest recompile json gts +TARGETS := all verify clean cleanall cleanlift cleanjson cleangts cleantest recompile json gts reliftgts .PHONY : $(TARGETS) $(ENABLED_COMPILERS) $(TARGETS): $(ENABLED_COMPILERS) diff --git a/src/test/make/lift.mk b/src/test/make/lift.mk index 7c9ab52d3..0cf42a08b 100644 --- a/src/test/make/lift.mk +++ b/src/test/make/lift.mk @@ -5,7 +5,7 @@ $(LIFT_ARTEFACTS): a.out $(READELF) -s -r -W a.out > $(NAME).relf $(BAP) a.out -d adt:$(NAME).adt -d bir:$(NAME).bir ddisasm a.out --ir $(NAME).gtirb - gtirb-semantics $(NAME).gtirb $(NAME).gts + $(GTIRB_SEMANTICS) $(NAME).gtirb $(NAME).gts ifdef $(SPEC) BASIL_SPECARG = --spec $(SPEC) @@ -27,15 +27,18 @@ $(BASIL): a.out: $(C_SOURCE) $(CC) $(CFLAGS) $(C_SOURCE) -.PHONY=recompile verify clean cleanlift cleanall cleanbin cleantest cleangts json gts +.PHONY=recompile verify clean cleanlift cleanall cleanbin cleantest cleangts json gts reliftgts verify: $(NAME)_bap.bpl $(NAME)_gtirb.bpl recompile: a.out +reliftgts: + $(GTIRB_SEMANTICS) $(NAME).gts $(NAME)-2.gts + mv $(NAME)-2.gts $(NAME).gts + gts: a.out ddisasm a.out --ir $(NAME).gtirb gtirb-semantics $(NAME).gtirb $(NAME).gts - rm -rf $(NAME).gtirb json: debug-gts.py $(NAME).gts > $(NAME).json @@ -72,4 +75,4 @@ cleanlift: rm -rf $(NAME).gts cleangts: - rm -rf $(NAME).gts \ No newline at end of file + rm -rf $(NAME).gts