mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-02-23 23:59:38 +00:00
externals: Update oaknut to 2.0.2
Merge commit '48dcc318c977ce17373f3710d04d96f9b05860a0'
This commit is contained in:
36
externals/oaknut/tests/basic.cpp
vendored
36
externals/oaknut/tests/basic.cpp
vendored
@@ -7,14 +7,18 @@
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
#include "oaknut/code_block.hpp"
|
||||
#include "oaknut/dual_code_block.hpp"
|
||||
#include "architecture.hpp"
|
||||
#include "oaknut/oaknut.hpp"
|
||||
#include "rand_int.hpp"
|
||||
|
||||
using namespace oaknut;
|
||||
using namespace oaknut::util;
|
||||
|
||||
#ifdef ON_ARM64
|
||||
|
||||
# include "oaknut/code_block.hpp"
|
||||
# include "oaknut/dual_code_block.hpp"
|
||||
|
||||
TEST_CASE("Basic Test")
|
||||
{
|
||||
CodeBlock mem{4096};
|
||||
@@ -196,19 +200,6 @@ TEST_CASE("ADR", "[slow]")
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("PageOffset (rollover)")
|
||||
{
|
||||
REQUIRE(PageOffset<21, 12>::encode(0x0000000088e74000, 0xffffffffd167dece) == 0xd2202);
|
||||
}
|
||||
|
||||
TEST_CASE("PageOffset (page boundary)")
|
||||
{
|
||||
REQUIRE(PageOffset<21, 12>::encode(0x0001000000000002, 0x0001000000000001) == 0);
|
||||
REQUIRE(PageOffset<21, 12>::encode(0x0001000000000001, 0x0001000000000002) == 0);
|
||||
REQUIRE(PageOffset<21, 12>::encode(0x0001000000001000, 0x0001000000000fff) == 0x1fffff);
|
||||
REQUIRE(PageOffset<21, 12>::encode(0x0001000000000fff, 0x0001000000001000) == 0x080000);
|
||||
}
|
||||
|
||||
TEST_CASE("ADRP", "[slow]")
|
||||
{
|
||||
CodeBlock mem{4096};
|
||||
@@ -325,3 +316,18 @@ TEST_CASE("MOVP2R (4GiB boundary)")
|
||||
test(-i);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
TEST_CASE("PageOffset (rollover)")
|
||||
{
|
||||
REQUIRE(PageOffset<21, 12>::encode(0x0000000088e74000, 0xffffffffd167dece) == 0xd2202);
|
||||
}
|
||||
|
||||
TEST_CASE("PageOffset (page boundary)")
|
||||
{
|
||||
REQUIRE(PageOffset<21, 12>::encode(0x0001000000000002, 0x0001000000000001) == 0);
|
||||
REQUIRE(PageOffset<21, 12>::encode(0x0001000000000001, 0x0001000000000002) == 0);
|
||||
REQUIRE(PageOffset<21, 12>::encode(0x0001000000001000, 0x0001000000000fff) == 0x1fffff);
|
||||
REQUIRE(PageOffset<21, 12>::encode(0x0001000000000fff, 0x0001000000001000) == 0x080000);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user