From 966d1616c5543ccf57f04a23322808ef65923341 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sat, 21 May 2022 11:55:24 +0200 Subject: [PATCH] change source code to unified layout --- CMakeLists.txt | 8 ++++---- {incl => src}/iss/arch/.gitignore | 0 {incl => src}/iss/arch/hwl.h | 0 {incl => src}/iss/arch/riscv_hart_common.h | 0 {incl => src}/iss/arch/riscv_hart_m_p.h | 0 {incl => src}/iss/arch/riscv_hart_msu_vp.h | 0 {incl => src}/iss/arch/riscv_hart_mu_p.h | 0 src/iss/{ => arch}/tgc_c.cpp | 2 +- {incl => src}/iss/arch/tgc_c.h | 0 {incl => src}/iss/arch/tgc_mapper.h | 0 {incl => src}/iss/debugger/riscv_target_adapter.h | 0 {incl => src}/iss/factory.h | 0 src/{ => iss}/plugin/cycle_estimate.cpp | 6 +++--- {incl => src}/iss/plugin/cycle_estimate.h | 0 src/{ => iss}/plugin/instruction_count.cpp | 4 ++-- {incl => src}/iss/plugin/instruction_count.h | 0 src/{ => iss}/plugin/pctrace.cpp | 6 +++--- {incl => src}/iss/plugin/pctrace.h | 0 src/main.cpp | 8 ++++---- src/sysc/core_complex.cpp | 2 +- {incl => src}/sysc/core_complex.h | 0 21 files changed, 18 insertions(+), 18 deletions(-) rename {incl => src}/iss/arch/.gitignore (100%) rename {incl => src}/iss/arch/hwl.h (100%) rename {incl => src}/iss/arch/riscv_hart_common.h (100%) rename {incl => src}/iss/arch/riscv_hart_m_p.h (100%) rename {incl => src}/iss/arch/riscv_hart_msu_vp.h (100%) rename {incl => src}/iss/arch/riscv_hart_mu_p.h (100%) rename src/iss/{ => arch}/tgc_c.cpp (99%) rename {incl => src}/iss/arch/tgc_c.h (100%) rename {incl => src}/iss/arch/tgc_mapper.h (100%) rename {incl => src}/iss/debugger/riscv_target_adapter.h (100%) rename {incl => src}/iss/factory.h (100%) rename src/{ => iss}/plugin/cycle_estimate.cpp (97%) rename {incl => src}/iss/plugin/cycle_estimate.h (100%) rename src/{ => iss}/plugin/instruction_count.cpp (97%) rename {incl => src}/iss/plugin/instruction_count.h (100%) rename src/{ => iss}/plugin/pctrace.cpp (98%) rename {incl => src}/iss/plugin/pctrace.h (100%) rename {incl => src}/sysc/core_complex.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index e676292..c039682 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,18 +29,18 @@ endif() add_subdirectory(softfloat) # library files -FILE(GLOB TGC_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/iss/*.cpp) +FILE(GLOB TGC_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/iss/arch/*.cpp) FILE(GLOB TGC_VM_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/vm/interp/vm_*.cpp) set(LIB_SOURCES src/vm/fp_functions.cpp - src/plugin/instruction_count.cpp + src/iss/plugin/instruction_count.cpp ${TGC_SOURCES} ${TGC_VM_SOURCES} ) if(TARGET RapidJSON) - list(APPEND LIB_SOURCES src/plugin/cycle_estimate.cpp src/plugin/pctrace.cpp) + list(APPEND LIB_SOURCES src/iss/plugin/cycle_estimate.cpp src/iss/plugin/pctrace.cpp) endif() if(WITH_LLVM) @@ -69,7 +69,7 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") target_compile_options(${PROJECT_NAME} PRIVATE /wd4293) endif() -target_include_directories(${PROJECT_NAME} PUBLIC incl) +target_include_directories(${PROJECT_NAME} PUBLIC src) target_link_libraries(${PROJECT_NAME} PUBLIC softfloat scc-util jsoncpp Boost::coroutine) if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") target_link_libraries(${PROJECT_NAME} PUBLIC -Wl,--whole-archive dbt-rise-core -Wl,--no-whole-archive) diff --git a/incl/iss/arch/.gitignore b/src/iss/arch/.gitignore similarity index 100% rename from incl/iss/arch/.gitignore rename to src/iss/arch/.gitignore diff --git a/incl/iss/arch/hwl.h b/src/iss/arch/hwl.h similarity index 100% rename from incl/iss/arch/hwl.h rename to src/iss/arch/hwl.h diff --git a/incl/iss/arch/riscv_hart_common.h b/src/iss/arch/riscv_hart_common.h similarity index 100% rename from incl/iss/arch/riscv_hart_common.h rename to src/iss/arch/riscv_hart_common.h diff --git a/incl/iss/arch/riscv_hart_m_p.h b/src/iss/arch/riscv_hart_m_p.h similarity index 100% rename from incl/iss/arch/riscv_hart_m_p.h rename to src/iss/arch/riscv_hart_m_p.h diff --git a/incl/iss/arch/riscv_hart_msu_vp.h b/src/iss/arch/riscv_hart_msu_vp.h similarity index 100% rename from incl/iss/arch/riscv_hart_msu_vp.h rename to src/iss/arch/riscv_hart_msu_vp.h diff --git a/incl/iss/arch/riscv_hart_mu_p.h b/src/iss/arch/riscv_hart_mu_p.h similarity index 100% rename from incl/iss/arch/riscv_hart_mu_p.h rename to src/iss/arch/riscv_hart_mu_p.h diff --git a/src/iss/tgc_c.cpp b/src/iss/arch/tgc_c.cpp similarity index 99% rename from src/iss/tgc_c.cpp rename to src/iss/arch/tgc_c.cpp index 35a27d0..a014ac7 100644 --- a/src/iss/tgc_c.cpp +++ b/src/iss/arch/tgc_c.cpp @@ -32,7 +32,7 @@ #include "util/ities.h" #include -#include +#include "tgc_c.h" #include #include #include diff --git a/incl/iss/arch/tgc_c.h b/src/iss/arch/tgc_c.h similarity index 100% rename from incl/iss/arch/tgc_c.h rename to src/iss/arch/tgc_c.h diff --git a/incl/iss/arch/tgc_mapper.h b/src/iss/arch/tgc_mapper.h similarity index 100% rename from incl/iss/arch/tgc_mapper.h rename to src/iss/arch/tgc_mapper.h diff --git a/incl/iss/debugger/riscv_target_adapter.h b/src/iss/debugger/riscv_target_adapter.h similarity index 100% rename from incl/iss/debugger/riscv_target_adapter.h rename to src/iss/debugger/riscv_target_adapter.h diff --git a/incl/iss/factory.h b/src/iss/factory.h similarity index 100% rename from incl/iss/factory.h rename to src/iss/factory.h diff --git a/src/plugin/cycle_estimate.cpp b/src/iss/plugin/cycle_estimate.cpp similarity index 97% rename from src/plugin/cycle_estimate.cpp rename to src/iss/plugin/cycle_estimate.cpp index 553a772..3174f30 100644 --- a/src/plugin/cycle_estimate.cpp +++ b/src/iss/plugin/cycle_estimate.cpp @@ -32,14 +32,14 @@ * eyck@minres.com - initial API and implementation ******************************************************************************/ -#include "iss/plugin/cycle_estimate.h" +#include "cycle_estimate.h" #include #include #include #include -#include "rapidjson/writer.h" -#include "rapidjson/stringbuffer.h" +#include +#include #include #include #include diff --git a/incl/iss/plugin/cycle_estimate.h b/src/iss/plugin/cycle_estimate.h similarity index 100% rename from incl/iss/plugin/cycle_estimate.h rename to src/iss/plugin/cycle_estimate.h diff --git a/src/plugin/instruction_count.cpp b/src/iss/plugin/instruction_count.cpp similarity index 97% rename from src/plugin/instruction_count.cpp rename to src/iss/plugin/instruction_count.cpp index aba30eb..0b54e21 100644 --- a/src/plugin/instruction_count.cpp +++ b/src/iss/plugin/instruction_count.cpp @@ -32,8 +32,8 @@ * eyck@minres.com - initial API and implementation ******************************************************************************/ -#include "iss/plugin/instruction_count.h" -#include "iss/instrumentation_if.h" +#include "instruction_count.h" +#include #include #include diff --git a/incl/iss/plugin/instruction_count.h b/src/iss/plugin/instruction_count.h similarity index 100% rename from incl/iss/plugin/instruction_count.h rename to src/iss/plugin/instruction_count.h diff --git a/src/plugin/pctrace.cpp b/src/iss/plugin/pctrace.cpp similarity index 98% rename from src/plugin/pctrace.cpp rename to src/iss/plugin/pctrace.cpp index d3d099b..7f25652 100644 --- a/src/plugin/pctrace.cpp +++ b/src/iss/plugin/pctrace.cpp @@ -1,11 +1,11 @@ #include -#include +#include "pctrace.h" #include #include #include #include -#include "rapidjson/writer.h" -#include "rapidjson/stringbuffer.h" +#include +#include #include #include #include diff --git a/incl/iss/plugin/pctrace.h b/src/iss/plugin/pctrace.h similarity index 100% rename from incl/iss/plugin/pctrace.h rename to src/iss/plugin/pctrace.h diff --git a/src/main.cpp b/src/main.cpp index d8d6bd6..0d4fe2f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -35,14 +35,14 @@ #include #include -#include +#include "iss/arch/tgc_mapper.h" #ifdef WITH_LLVM #include #endif #include -#include -#include -#include +#include "iss/plugin/cycle_estimate.h" +#include "iss/plugin/instruction_count.h" +#include "iss/plugin/pctrace.h" #include #if defined(HAS_LUA) #include diff --git a/src/sysc/core_complex.cpp b/src/sysc/core_complex.cpp index 53ff0cb..118767e 100644 --- a/src/sysc/core_complex.cpp +++ b/src/sysc/core_complex.cpp @@ -38,7 +38,7 @@ #include #include #include -#include +#include "core_complex.h" #include #include #include diff --git a/incl/sysc/core_complex.h b/src/sysc/core_complex.h similarity index 100% rename from incl/sysc/core_complex.h rename to src/sysc/core_complex.h