early-access version 1995
This commit is contained in:
4
externals/dynarmic/tests/A32/fuzz_arm.cpp
vendored
4
externals/dynarmic/tests/A32/fuzz_arm.cpp
vendored
@@ -10,7 +10,7 @@
|
||||
#include <tuple>
|
||||
#include <vector>
|
||||
|
||||
#include <catch.hpp>
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include "../fuzz_util.h"
|
||||
#include "../rand_int.h"
|
||||
@@ -372,7 +372,7 @@ static void RunTestInstance(Dynarmic::A32::Jit& jit,
|
||||
fmt::print("\n");
|
||||
|
||||
fmt::print("x86_64:\n");
|
||||
fmt::print("{}\n", jit.Disassemble());
|
||||
jit.DumpDisassembly();
|
||||
|
||||
fmt::print("Interrupts:\n");
|
||||
for (const auto& i : uni_env.interrupts) {
|
||||
|
5
externals/dynarmic/tests/A32/fuzz_thumb.cpp
vendored
5
externals/dynarmic/tests/A32/fuzz_thumb.cpp
vendored
@@ -12,7 +12,7 @@
|
||||
#include <string_view>
|
||||
#include <tuple>
|
||||
|
||||
#include <catch.hpp>
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include "../rand_int.h"
|
||||
#include "../unicorn_emu/a32_unicorn.h"
|
||||
@@ -183,7 +183,8 @@ static void RunInstance(size_t run_number, ThumbTestEnv& test_env, A32Unicorn<Th
|
||||
Optimization::DeadCodeElimination(ir_block);
|
||||
Optimization::VerificationPass(ir_block);
|
||||
printf("\n\nIR:\n%s", IR::DumpBlock(ir_block).c_str());
|
||||
printf("\n\nx86_64:\n%s", jit.Disassemble().c_str());
|
||||
printf("\n\nx86_64:\n");
|
||||
jit.DumpDisassembly();
|
||||
num_insts += ir_block.CycleCount();
|
||||
}
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* SPDX-License-Identifier: 0BSD
|
||||
*/
|
||||
|
||||
#include <catch.hpp>
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include "dynarmic/frontend/A32/disassembler/disassembler.h"
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* SPDX-License-Identifier: 0BSD
|
||||
*/
|
||||
|
||||
#include <catch.hpp>
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include "./testenv.h"
|
||||
#include "dynarmic/frontend/A32/location_descriptor.h"
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* SPDX-License-Identifier: 0BSD
|
||||
*/
|
||||
|
||||
#include <catch.hpp>
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include "./testenv.h"
|
||||
#include "dynarmic/common/common_types.h"
|
||||
|
53
externals/dynarmic/tests/A64/a64.cpp
vendored
53
externals/dynarmic/tests/A64/a64.cpp
vendored
@@ -3,7 +3,7 @@
|
||||
* SPDX-License-Identifier: 0BSD
|
||||
*/
|
||||
|
||||
#include <catch.hpp>
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include "./testenv.h"
|
||||
#include "dynarmic/common/fp/fpsr.h"
|
||||
@@ -675,6 +675,57 @@ TEST_CASE("A64: FMADD", "[a64]") {
|
||||
REQUIRE(jit.GetVector(10) == Vector{0x3f059921bf0dbfff, 0x0000000000000000});
|
||||
}
|
||||
|
||||
TEST_CASE("A64: FMLA.4S(lane)", "[a64]") {
|
||||
A64TestEnv env;
|
||||
A64::Jit jit{A64::UserConfig{&env}};
|
||||
|
||||
env.code_mem.emplace_back(0x4f8f11c0); // FMLA.4S V0, V14, V15[0]
|
||||
env.code_mem.emplace_back(0x4faf11c1); // FMLA.4S V1, V14, V15[1]
|
||||
env.code_mem.emplace_back(0x4f8f19c2); // FMLA.4S V2, V14, V15[2]
|
||||
env.code_mem.emplace_back(0x4faf19c3); // FMLA.4S V3, V14, V15[3]
|
||||
env.code_mem.emplace_back(0x14000000); // B .
|
||||
|
||||
jit.SetPC(0);
|
||||
jit.SetVector(0, {0x3ff00000'3ff00000, 0x00000000'00000000});
|
||||
jit.SetVector(1, {0x3ff00000'3ff00000, 0x00000000'00000000});
|
||||
jit.SetVector(2, {0x3ff00000'3ff00000, 0x00000000'00000000});
|
||||
jit.SetVector(3, {0x3ff00000'3ff00000, 0x00000000'00000000});
|
||||
|
||||
jit.SetVector(14, {0x3ff00000'3ff00000, 0x3ff00000'3ff00000});
|
||||
jit.SetVector(15, {0x3ff00000'40000000, 0x40400000'40800000});
|
||||
|
||||
env.ticks_left = 5;
|
||||
jit.Run();
|
||||
|
||||
REQUIRE(jit.GetVector(0) == Vector{0x40b4000040b40000, 0x4070000040700000});
|
||||
REQUIRE(jit.GetVector(1) == Vector{0x40ac800040ac8000, 0x4061000040610000});
|
||||
REQUIRE(jit.GetVector(2) == Vector{0x4116000041160000, 0x40f0000040f00000});
|
||||
REQUIRE(jit.GetVector(3) == Vector{0x40f0000040f00000, 0x40b4000040b40000});
|
||||
}
|
||||
|
||||
TEST_CASE("A64: FMUL.4S(lane)", "[a64]") {
|
||||
A64TestEnv env;
|
||||
A64::Jit jit{A64::UserConfig{&env}};
|
||||
|
||||
env.code_mem.emplace_back(0x4f8f91c0); // FMUL.4S V0, V14, V15[0]
|
||||
env.code_mem.emplace_back(0x4faf91c1); // FMUL.4S V1, V14, V15[1]
|
||||
env.code_mem.emplace_back(0x4f8f99c2); // FMUL.4S V2, V14, V15[2]
|
||||
env.code_mem.emplace_back(0x4faf99c3); // FMUL.4S V3, V14, V15[3]
|
||||
env.code_mem.emplace_back(0x14000000); // B .
|
||||
|
||||
jit.SetPC(0);
|
||||
jit.SetVector(14, {0x3ff00000'3ff00000, 0x3ff00000'3ff00000});
|
||||
jit.SetVector(15, {0x3ff00000'40000000, 0x40400000'40800000});
|
||||
|
||||
env.ticks_left = 5;
|
||||
jit.Run();
|
||||
|
||||
REQUIRE(jit.GetVector(0) == Vector{0x4070000040700000, 0x4070000040700000});
|
||||
REQUIRE(jit.GetVector(1) == Vector{0x4061000040610000, 0x4061000040610000});
|
||||
REQUIRE(jit.GetVector(2) == Vector{0x40f0000040f00000, 0x40f0000040f00000});
|
||||
REQUIRE(jit.GetVector(3) == Vector{0x40b4000040b40000, 0x40b4000040b40000});
|
||||
}
|
||||
|
||||
TEST_CASE("A64: FMLA.4S (denormal)", "[a64]") {
|
||||
A64TestEnv env;
|
||||
A64::Jit jit{A64::UserConfig{&env}};
|
||||
|
@@ -8,7 +8,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <catch.hpp>
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include "../fuzz_util.h"
|
||||
#include "../rand_int.h"
|
||||
@@ -232,7 +232,7 @@ static void RunTestInstance(Dynarmic::A64::Jit& jit, A64Unicorn& uni, A64TestEnv
|
||||
}
|
||||
const auto uni_vecs = uni.GetVectors();
|
||||
for (size_t i = 0; i < vecs.size(); ++i) {
|
||||
fmt::print("{:3s}: {}{} {}{} {}\n", A64::VecToString(static_cast<A64::Vec>(i)),
|
||||
fmt::print("{:3s}: {:016x}{:016x} {:016x}{:016x} {}\n", A64::VecToString(static_cast<A64::Vec>(i)),
|
||||
uni_vecs[i][1], uni_vecs[i][0],
|
||||
jit.GetVectors()[i][1], jit.GetVectors()[i][0],
|
||||
uni_vecs[i] != jit.GetVectors()[i] ? "*" : "");
|
||||
@@ -276,7 +276,7 @@ static void RunTestInstance(Dynarmic::A64::Jit& jit, A64Unicorn& uni, A64TestEnv
|
||||
fmt::print("{}\n", IR::DumpBlock(ir_block));
|
||||
|
||||
fmt::print("x86_64:\n");
|
||||
fmt::print("{}\n", jit.Disassemble());
|
||||
jit.DumpDisassembly();
|
||||
|
||||
fmt::print("Interrupts:\n");
|
||||
for (auto& i : uni_env.interrupts) {
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* SPDX-License-Identifier: 0BSD
|
||||
*/
|
||||
|
||||
#include <catch.hpp>
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include "./testenv.h"
|
||||
#include "dynarmic/interface/A64/a64.h"
|
||||
|
@@ -5,7 +5,7 @@
|
||||
|
||||
#include <array>
|
||||
|
||||
#include <catch.hpp>
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include "../rand_int.h"
|
||||
#include "../unicorn_emu/a64_unicorn.h"
|
||||
|
4
externals/dynarmic/tests/cpu_info.cpp
vendored
4
externals/dynarmic/tests/cpu_info.cpp
vendored
@@ -6,8 +6,8 @@
|
||||
#include <array>
|
||||
#include <utility>
|
||||
|
||||
#include <catch.hpp>
|
||||
#include <xbyak_util.h>
|
||||
#include <catch2/catch.hpp>
|
||||
#include <xbyak/xbyak_util.h>
|
||||
|
||||
TEST_CASE("Host CPU supports", "[a64]") {
|
||||
Xbyak::util::Cpu cpu_info;
|
||||
|
2
externals/dynarmic/tests/decoder_tests.cpp
vendored
2
externals/dynarmic/tests/decoder_tests.cpp
vendored
@@ -7,7 +7,7 @@
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
|
||||
#include <catch.hpp>
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include "dynarmic/common/assert.h"
|
||||
#include "dynarmic/frontend/A32/decoder/asimd.h"
|
||||
|
2
externals/dynarmic/tests/fp/FPToFixed.cpp
vendored
2
externals/dynarmic/tests/fp/FPToFixed.cpp
vendored
@@ -6,7 +6,7 @@
|
||||
#include <tuple>
|
||||
#include <vector>
|
||||
|
||||
#include <catch.hpp>
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include "../rand_int.h"
|
||||
#include "dynarmic/common/common_types.h"
|
||||
|
@@ -6,7 +6,7 @@
|
||||
#include <tuple>
|
||||
#include <vector>
|
||||
|
||||
#include <catch.hpp>
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include "../rand_int.h"
|
||||
#include "dynarmic/common/common_types.h"
|
||||
|
@@ -6,7 +6,7 @@
|
||||
#include <tuple>
|
||||
#include <vector>
|
||||
|
||||
#include <catch.hpp>
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include "../rand_int.h"
|
||||
#include "dynarmic/common/common_types.h"
|
||||
|
2
externals/dynarmic/tests/main.cpp
vendored
2
externals/dynarmic/tests/main.cpp
vendored
@@ -4,4 +4,4 @@
|
||||
*/
|
||||
|
||||
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
|
||||
#include <catch.hpp>
|
||||
#include <catch2/catch.hpp>
|
||||
|
2
externals/dynarmic/tests/rsqrt_test.cpp
vendored
2
externals/dynarmic/tests/rsqrt_test.cpp
vendored
@@ -3,7 +3,7 @@
|
||||
* SPDX-License-Identifier: 0BSD
|
||||
*/
|
||||
|
||||
#include <catch.hpp>
|
||||
#include <catch2/catch.hpp>
|
||||
#include <fmt/printf.h>
|
||||
|
||||
#include "dynarmic/common/common_types.h"
|
||||
|
Reference in New Issue
Block a user