CPU: Add new experimental recompiler
This commit is contained in:
@@ -121,6 +121,11 @@ set(RECOMPILER_SRCS
|
||||
cpu_recompiler_types.h
|
||||
)
|
||||
|
||||
set(NEWREC_SOURCES
|
||||
cpu_newrec_compiler.cpp
|
||||
cpu_newrec_compiler.h
|
||||
)
|
||||
|
||||
target_precompile_headers(core PRIVATE "pch.h")
|
||||
target_include_directories(core PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/..")
|
||||
target_include_directories(core PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/..")
|
||||
@@ -134,6 +139,15 @@ if(${CPU_ARCH} STREQUAL "x64")
|
||||
cpu_recompiler_code_generator_x64.cpp
|
||||
)
|
||||
message("Building x64 recompiler")
|
||||
|
||||
if(ENABLE_NEWREC)
|
||||
target_compile_definitions(core PUBLIC "ENABLE_NEWREC=1")
|
||||
target_sources(core PRIVATE ${NEWREC_SOURCES}
|
||||
cpu_newrec_compiler_x64.cpp
|
||||
cpu_newrec_compiler_x64.h
|
||||
)
|
||||
message("Building x64 newrec")
|
||||
endif()
|
||||
elseif(${CPU_ARCH} STREQUAL "aarch32")
|
||||
target_compile_definitions(core PUBLIC "ENABLE_RECOMPILER=1")
|
||||
target_sources(core PRIVATE ${RECOMPILER_SRCS}
|
||||
@@ -148,6 +162,25 @@ elseif(${CPU_ARCH} STREQUAL "aarch64")
|
||||
)
|
||||
target_link_libraries(core PUBLIC vixl)
|
||||
message("Building AArch64 recompiler")
|
||||
if(ENABLE_NEWREC)
|
||||
target_compile_definitions(core PUBLIC "ENABLE_NEWREC=1")
|
||||
target_sources(core PRIVATE ${NEWREC_SOURCES}
|
||||
cpu_newrec_compiler_aarch64.cpp
|
||||
cpu_newrec_compiler_aarch64.h
|
||||
)
|
||||
message("Building AArch64 newrec")
|
||||
endif()
|
||||
elseif(${CPU_ARCH} STREQUAL "riscv64")
|
||||
target_compile_definitions(core PUBLIC "ENABLE_MMAP_FASTMEM=1")
|
||||
if(ENABLE_NEWREC)
|
||||
target_compile_definitions(core PUBLIC "ENABLE_NEWREC=1")
|
||||
target_sources(core PRIVATE ${NEWREC_SOURCES}
|
||||
cpu_newrec_compiler_riscv64.cpp
|
||||
cpu_newrec_compiler_riscv64.h
|
||||
)
|
||||
target_link_libraries(core PUBLIC biscuit::biscuit riscv-disas)
|
||||
message("Building RISC-V 64-bit newrec")
|
||||
endif()
|
||||
else()
|
||||
message("Not building recompiler")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user