From 9371a09b71dd3e850d89b35fe1f93ff0813a689d Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Sun, 22 Oct 2023 15:10:55 +0200 Subject: [PATCH] adds asmjit --- CMakeLists.txt | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 765aafc..56955b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,7 +31,11 @@ if(WITH_LLVM) src/vm/llvm/fp_impl.cpp ) endif() - +if(WITH_ASMJIT) + list(APPEND LIB_SOURCES + src/vm/asmjit/vm_tgc5c.cpp + ) +endif() # library files FILE(GLOB GEN_ISS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src-gen/iss/arch/*.cpp) FILE(GLOB GEN_VM_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src-gen/vm/interp/vm_*.cpp) @@ -52,7 +56,10 @@ if(WITH_TCC) FILE(GLOB TCC_GEN_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src-gen/vm/tcc/vm_*.cpp) list(APPEND LIB_SOURCES ${TCC_GEN_SOURCES}) endif() - +if(WITH_ASMJIT) + FILE(GLOB TCC_GEN_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src-gen/vm/asmjit/vm_*.cpp) + list(APPEND LIB_SOURCES ${TCC_GEN_SOURCES}) +endif() if(TARGET RapidJSON OR TARGET RapidJSON::RapidJSON) list(APPEND LIB_SOURCES src/iss/plugin/cycle_estimate.cpp @@ -185,6 +192,10 @@ if(BUILD_TESTING) add_test(NAME tgc-sim-llvm COMMAND tgc-sim -f ${CMAKE_BINARY_DIR}/../../Firmwares/hello-world/hello --backend llvm) endif() + if(WITH_ASMJIT) + add_test(NAME tgc-sim-asmjit + COMMAND tgc-sim -f ${CMAKE_BINARY_DIR}/../../Firmwares/hello-world/hello --backend asmjit) + endif() endif() ############################################################################### #