From 7ba61209fcc1f03fa7fce11c229dc09e03c2ed76 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Thu, 6 Jan 2022 15:06:35 +0100 Subject: [PATCH] early-access version 2377 --- README.md | 2 +- .../src/dynarmic/backend/x64/constant_pool.cpp | 2 +- .../src/dynarmic/backend/x64/constant_pool.h | 13 ++++++++++--- .../A32/disassembler/disassembler_thumb.cpp | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 22b4eaf55..6d8013c89 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 2376. +This is the source code for early-access 2377. ## Legal Notice diff --git a/externals/dynarmic/src/dynarmic/backend/x64/constant_pool.cpp b/externals/dynarmic/src/dynarmic/backend/x64/constant_pool.cpp index 2f5015235..39ffdf14d 100755 --- a/externals/dynarmic/src/dynarmic/backend/x64/constant_pool.cpp +++ b/externals/dynarmic/src/dynarmic/backend/x64/constant_pool.cpp @@ -21,7 +21,7 @@ ConstantPool::ConstantPool(BlockOfCode& code, size_t size) } Xbyak::Address ConstantPool::GetConstant(const Xbyak::AddressFrame& frame, u64 lower, u64 upper) { - const auto constant = std::make_tuple(lower, upper); + const auto constant = std::make_pair(lower, upper); auto iter = constant_info.find(constant); if (iter == constant_info.end()) { ASSERT(static_cast(current_pool_ptr - pool_begin) < pool_size); diff --git a/externals/dynarmic/src/dynarmic/backend/x64/constant_pool.h b/externals/dynarmic/src/dynarmic/backend/x64/constant_pool.h index 16cdb2360..04243993d 100755 --- a/externals/dynarmic/src/dynarmic/backend/x64/constant_pool.h +++ b/externals/dynarmic/src/dynarmic/backend/x64/constant_pool.h @@ -5,9 +5,10 @@ #pragma once -#include -#include +#include +#include +#include #include #include "dynarmic/common/common_types.h" @@ -29,7 +30,13 @@ public: private: static constexpr size_t align_size = 16; // bytes - std::map, void*> constant_info; + struct ConstantHash { + std::size_t operator()(const std::pair& constant) const noexcept { + return constant.first ^ std::rotl(constant.second, 1); + } + }; + + tsl::robin_map, void*, ConstantHash> constant_info; BlockOfCode& code; size_t pool_size; diff --git a/externals/dynarmic/src/dynarmic/frontend/A32/disassembler/disassembler_thumb.cpp b/externals/dynarmic/src/dynarmic/frontend/A32/disassembler/disassembler_thumb.cpp index d5f43cb85..ec05b0dd0 100755 --- a/externals/dynarmic/src/dynarmic/frontend/A32/disassembler/disassembler_thumb.cpp +++ b/externals/dynarmic/src/dynarmic/frontend/A32/disassembler/disassembler_thumb.cpp @@ -285,7 +285,7 @@ public: // Sanity note: Here imm8.Bit<0>() is guaranteed to be == 1. (imm8 can never be 0bxxxx0000) return std::make_tuple(imm8.Bit<3>() == firstcond0 ? "t" : "e", imm8.Bit<2>() == firstcond0 ? "t" : "e", imm8.Bit<1>() == firstcond0 ? "t" : "e"); }(); - return fmt::format("it{}{}{} {}", x, y, z, firstcond); + return fmt::format("it{}{}{} {}", x, y, z, CondToString(firstcond)); } std::string thumb16_SXTH(Reg m, Reg d) {