diff --git a/src/dynarmic/backend/x64/constant_pool.h b/src/dynarmic/backend/x64/constant_pool.h index 16cdb236..1e4fb695 100644 --- a/src/dynarmic/backend/x64/constant_pool.h +++ b/src/dynarmic/backend/x64/constant_pool.h @@ -5,8 +5,9 @@ #pragma once -#include +#include #include +#include #include @@ -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::tuple& constant) const { + return std::get<0>(constant) ^ std::rotl(std::get<1>(constant), 1); + } + }; + + std::unordered_map, void*, ConstantHash> constant_info; BlockOfCode& code; size_t pool_size;