Skip to content

Commit

Permalink
update CMakeLists.txt and tcc vm basse
Browse files Browse the repository at this point in the history
  • Loading branch information
eyck committed Apr 9, 2022
1 parent 6d9e216 commit 44acf8a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
cmake_minimum_required(VERSION 3.12)

project(dbt-core VERSION 1.0.0)
project(dbt-rise-core VERSION 1.0.0)

include(GNUInstallDirs)

find_package(Boost COMPONENTS serialization thread REQUIRED)
find_package(tcc QUIET)
if(tcc_FOUND)
set(WITH_TCC ON)
else(TARGET CONAN_PKG::tcc)
set(WITH_TCC ON)
endif()

find_package(fmt QUIET)

if(WITH_LLVM)
Expand Down
7 changes: 4 additions & 3 deletions incl/iss/tcc/vm_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ template <typename ARCH> class vm_base : public debugger_if, public vm_if {

using func_ptr = uint64_t (*)(uint8_t *, void *, void *);

int start(uint64_t icount = std::numeric_limits<uint64_t>::max(), bool dump = false) override {
int start(uint64_t icount = std::numeric_limits<uint64_t>::max(), bool dump = false,
finish_cond_e cond = finish_cond_e::COUNT_LIMIT | finish_cond_e::JUMP_TO_SELF) override {
int error = 0;
if (this->debugging_enabled()) sync_exec = PRE_SYNC;
auto start = std::chrono::high_resolution_clock::now();
Expand Down Expand Up @@ -166,7 +167,7 @@ template <typename ARCH> class vm_base : public debugger_if, public vm_if {
}
}
} catch (trap_access &ta) {
pc.val = core.enter_trap(ta.id, ta.addr);
pc.val = core.enter_trap(ta.id, ta.addr, 0);
}
#ifndef NDEBUG
LOG(TRACE) << "continuing @0x" << std::hex << pc << std::dec;
Expand All @@ -178,7 +179,7 @@ template <typename ARCH> class vm_base : public debugger_if, public vm_if {
LOG(INFO) << "ISS execution stopped with status 0x" << std::hex << e.state << std::dec;
if (e.state != 1) error = e.state;
} catch (decoding_error &e) {
LOG(ERROR) << "ISS execution aborted at address 0x" << std::hex << e.addr << std::dec;
LOG(ERR) << "ISS execution aborted at address 0x" << std::hex << e.addr << std::dec;
error = -1;
}
auto end = std::chrono::high_resolution_clock::now(); // end measurement
Expand Down

0 comments on commit 44acf8a

Please sign in to comment.