Files
eden/src/dynarmic/tests/A64/misaligned_page_table.cpp
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
1.0 KiB
C++
Raw Normal View History

// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
2025-09-27 20:41:52 +02:00
// SPDX-License-Identifier: GPL-3.0-or-later
2025-05-31 02:33:02 -04:00
/* This file is part of the dynarmic project.
* Copyright (c) 2018 MerryMage
* SPDX-License-Identifier: 0BSD
*/
#include <catch2/catch_test_macros.hpp>
#include "dynarmic/tests/A64/testenv.h"
#include "dynarmic/tests/native/testenv.h"
2025-05-31 02:33:02 -04:00
#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;
2025-07-22 17:36:26 +01:00
Dynarmic::A64::UserConfig conf{};
conf.callbacks = &env;
2025-05-31 02:33:02 -04:00
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;
2025-08-27 06:49:50 +02:00
CheckedRun([&]() { jit.Run(); });
2025-05-31 02:33:02 -04:00
// If we don't crash we're fine.
}