diff options
| author | swurl <swurl@swurl.xyz> | 2025-05-31 02:33:02 -0400 |
|---|---|---|
| committer | swurl <swurl@swurl.xyz> | 2025-05-31 02:33:02 -0400 |
| commit | 6c655321e6b04b8648802e296bb5ca11d290ae68 (patch) | |
| tree | 5c906511e4a2910ce8b806bb9d763b524c28619e /externals/dynarmic/tests/A64/misaligned_page_table.cpp | |
| parent | c0cceff365f754f8859f4c9a0362ebdba7ea388b (diff) | |
Move dead submodules in-tree
Signed-off-by: swurl <swurl@swurl.xyz>
Diffstat (limited to 'externals/dynarmic/tests/A64/misaligned_page_table.cpp')
| -rw-r--r-- | externals/dynarmic/tests/A64/misaligned_page_table.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/externals/dynarmic/tests/A64/misaligned_page_table.cpp b/externals/dynarmic/tests/A64/misaligned_page_table.cpp new file mode 100644 index 0000000000..f54aa58641 --- /dev/null +++ b/externals/dynarmic/tests/A64/misaligned_page_table.cpp @@ -0,0 +1,29 @@ +/* This file is part of the dynarmic project. + * Copyright (c) 2018 MerryMage + * SPDX-License-Identifier: 0BSD + */ + +#include <catch2/catch_test_macros.hpp> + +#include "./testenv.h" +#include "dynarmic/interface/A64/a64.h" + +TEST_CASE("misaligned load/store do not use page_table when detect_misaligned_access_via_page_table is set", "[a64]") { + A64TestEnv env; + Dynarmic::A64::UserConfig conf{&env}; + conf.page_table = nullptr; + conf.detect_misaligned_access_via_page_table = 128; + conf.only_detect_misalignment_via_page_table_on_page_boundary = true; + Dynarmic::A64::Jit jit{conf}; + + env.code_mem.emplace_back(0x3c800400); // STR Q0, [X0], #0 + env.code_mem.emplace_back(0x14000000); // B . + + jit.SetPC(0); + jit.SetRegister(0, 0x000000000b0afff8); + + env.ticks_left = 2; + jit.Run(); + + // If we don't crash we're fine. +} |
