2023-01-06 14:27:06 +00:00
|
|
|
include(TargetArchitectureSpecificSources)
|
|
|
|
|
2017-11-26 11:39:27 +00:00
|
|
|
add_executable(dynarmic_tests
|
2018-06-29 19:34:46 +01:00
|
|
|
fp/FPToFixed.cpp
|
2018-08-16 10:50:28 +01:00
|
|
|
fp/FPValue.cpp
|
2018-06-29 18:52:48 +01:00
|
|
|
fp/mantissa_util_tests.cpp
|
2018-06-27 13:52:20 +01:00
|
|
|
fp/unpacked_tests.cpp
|
2017-11-26 11:39:27 +00:00
|
|
|
rand_int.h
|
|
|
|
)
|
2016-07-04 10:22:11 +01:00
|
|
|
|
2021-07-17 22:06:22 +01:00
|
|
|
if ("A32" IN_LIST DYNARMIC_FRONTENDS)
|
|
|
|
target_sources(dynarmic_tests PRIVATE
|
|
|
|
A32/test_arm_disassembler.cpp
|
|
|
|
A32/test_arm_instructions.cpp
|
2022-08-07 21:29:43 +01:00
|
|
|
A32/test_coprocessor.cpp
|
2022-12-29 20:19:56 +00:00
|
|
|
A32/test_svc.cpp
|
2021-07-17 22:06:22 +01:00
|
|
|
A32/test_thumb_instructions.cpp
|
|
|
|
A32/testenv.h
|
|
|
|
decoder_tests.cpp
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if ("A64" IN_LIST DYNARMIC_FRONTENDS)
|
2023-03-31 10:26:35 +01:00
|
|
|
target_link_libraries(dynarmic_tests PRIVATE merry::oaknut)
|
|
|
|
|
2021-07-17 22:06:22 +01:00
|
|
|
target_sources(dynarmic_tests PRIVATE
|
|
|
|
A64/a64.cpp
|
2023-03-31 10:26:35 +01:00
|
|
|
A64/fibonacci.cpp
|
2022-12-29 17:01:17 +00:00
|
|
|
A64/fp_min_max.cpp
|
2022-07-11 15:57:14 +01:00
|
|
|
A64/misaligned_page_table.cpp
|
|
|
|
A64/test_invalidation.cpp
|
2021-07-17 22:06:22 +01:00
|
|
|
A64/testenv.h
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2018-01-13 18:04:19 +00:00
|
|
|
if (DYNARMIC_TESTS_USE_UNICORN)
|
2021-07-17 22:06:22 +01:00
|
|
|
target_link_libraries(dynarmic_tests PRIVATE Unicorn::Unicorn)
|
|
|
|
|
2018-01-13 18:04:19 +00:00
|
|
|
target_sources(dynarmic_tests PRIVATE
|
2018-08-11 18:17:41 +01:00
|
|
|
fuzz_util.cpp
|
|
|
|
fuzz_util.h
|
2018-01-13 18:04:19 +00:00
|
|
|
)
|
2021-07-17 22:06:22 +01:00
|
|
|
|
|
|
|
if ("A32" IN_LIST DYNARMIC_FRONTENDS)
|
|
|
|
target_sources(dynarmic_tests PRIVATE
|
|
|
|
A32/fuzz_arm.cpp
|
|
|
|
A32/fuzz_thumb.cpp
|
|
|
|
unicorn_emu/a32_unicorn.cpp
|
|
|
|
unicorn_emu/a32_unicorn.h
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if ("A64" IN_LIST DYNARMIC_FRONTENDS)
|
|
|
|
target_sources(dynarmic_tests PRIVATE
|
|
|
|
A64/fuzz_with_unicorn.cpp
|
|
|
|
A64/verify_unicorn.cpp
|
|
|
|
unicorn_emu/a64_unicorn.cpp
|
|
|
|
unicorn_emu/a64_unicorn.h
|
|
|
|
)
|
|
|
|
endif()
|
2018-01-13 18:04:19 +00:00
|
|
|
endif()
|
|
|
|
|
2023-01-06 14:27:06 +00:00
|
|
|
if ("x86_64" IN_LIST ARCHITECTURE)
|
2022-11-22 01:42:52 +00:00
|
|
|
target_link_libraries(dynarmic_tests PRIVATE xbyak::xbyak)
|
2021-07-17 21:18:01 +01:00
|
|
|
|
2023-01-06 14:27:06 +00:00
|
|
|
target_architecture_specific_sources(dynarmic_tests "x86_64"
|
2021-07-17 21:18:01 +01:00
|
|
|
x64_cpu_info.cpp
|
|
|
|
)
|
|
|
|
|
2023-01-06 14:27:06 +00:00
|
|
|
if (NOT MSVC AND NOT DYNARMIC_MULTIARCH_BUILD)
|
2021-07-17 21:18:01 +01:00
|
|
|
target_sources(dynarmic_tests PRIVATE
|
|
|
|
rsqrt_test.cpp
|
|
|
|
rsqrt_test_fn.s
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2016-08-25 18:22:08 +01:00
|
|
|
include(CreateDirectoryGroups)
|
2021-07-17 22:06:22 +01:00
|
|
|
|
|
|
|
if (("A32" IN_LIST DYNARMIC_FRONTENDS) AND ("A64" IN_LIST DYNARMIC_FRONTENDS))
|
|
|
|
add_executable(dynarmic_print_info
|
|
|
|
print_info.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
create_target_directory_groups(dynarmic_print_info)
|
|
|
|
|
2022-12-31 16:26:55 +00:00
|
|
|
target_link_libraries(dynarmic_print_info PRIVATE dynarmic Boost::boost fmt::fmt merry::mcl)
|
2021-07-17 22:06:22 +01:00
|
|
|
target_include_directories(dynarmic_print_info PRIVATE . ../src)
|
|
|
|
target_compile_options(dynarmic_print_info PRIVATE ${DYNARMIC_CXX_FLAGS})
|
|
|
|
target_compile_definitions(dynarmic_print_info PRIVATE FMT_USE_USER_DEFINED_LITERALS=1)
|
|
|
|
endif()
|
|
|
|
|
2022-12-06 14:50:37 +00:00
|
|
|
if (("A32" IN_LIST DYNARMIC_FRONTENDS) AND ("A64" IN_LIST DYNARMIC_FRONTENDS))
|
2022-07-22 14:57:39 +01:00
|
|
|
add_executable(dynarmic_test_generator
|
|
|
|
fuzz_util.cpp
|
|
|
|
fuzz_util.h
|
|
|
|
test_generator.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
create_target_directory_groups(dynarmic_test_generator)
|
|
|
|
|
2022-12-31 16:26:55 +00:00
|
|
|
target_link_libraries(dynarmic_test_generator PRIVATE dynarmic Boost::boost fmt::fmt merry::mcl)
|
2022-07-22 14:57:39 +01:00
|
|
|
target_include_directories(dynarmic_test_generator PRIVATE . ../src)
|
|
|
|
target_compile_options(dynarmic_test_generator PRIVATE ${DYNARMIC_CXX_FLAGS})
|
|
|
|
target_compile_definitions(dynarmic_test_generator PRIVATE FMT_USE_USER_DEFINED_LITERALS=1)
|
|
|
|
endif()
|
|
|
|
|
2023-01-16 00:25:41 +00:00
|
|
|
if (("A32" IN_LIST DYNARMIC_FRONTENDS) AND ("A64" IN_LIST DYNARMIC_FRONTENDS))
|
|
|
|
add_executable(dynarmic_test_reader
|
|
|
|
test_reader.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
create_target_directory_groups(dynarmic_test_reader)
|
|
|
|
|
|
|
|
target_link_libraries(dynarmic_test_reader PRIVATE dynarmic Boost::boost fmt::fmt merry::mcl)
|
|
|
|
target_include_directories(dynarmic_test_reader PRIVATE . ../src)
|
|
|
|
target_compile_options(dynarmic_test_reader PRIVATE ${DYNARMIC_CXX_FLAGS})
|
|
|
|
target_compile_definitions(dynarmic_test_reader PRIVATE FMT_USE_USER_DEFINED_LITERALS=1)
|
|
|
|
endif()
|
|
|
|
|
2017-11-26 11:39:27 +00:00
|
|
|
create_target_directory_groups(dynarmic_tests)
|
2016-08-25 18:22:08 +01:00
|
|
|
|
2022-12-31 16:26:55 +00:00
|
|
|
target_link_libraries(dynarmic_tests PRIVATE dynarmic Boost::boost Catch2::Catch2WithMain fmt::fmt merry::mcl)
|
2016-12-19 00:41:21 +00:00
|
|
|
target_include_directories(dynarmic_tests PRIVATE . ../src)
|
2016-12-19 15:01:49 +00:00
|
|
|
target_compile_options(dynarmic_tests PRIVATE ${DYNARMIC_CXX_FLAGS})
|
2022-12-31 18:43:35 +00:00
|
|
|
target_compile_definitions(dynarmic_tests PRIVATE FMT_USE_USER_DEFINED_LITERALS=1)
|
2016-08-25 18:22:08 +01:00
|
|
|
|
2021-05-31 11:51:58 +01:00
|
|
|
add_test(dynarmic_tests dynarmic_tests --durations yes)
|