early-access version 2377
This commit is contained in:
parent
9eecae303d
commit
7ba61209fc
4 changed files with 13 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 2376.
|
This is the source code for early-access 2377.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ ConstantPool::ConstantPool(BlockOfCode& code, size_t size)
|
||||||
}
|
}
|
||||||
|
|
||||||
Xbyak::Address ConstantPool::GetConstant(const Xbyak::AddressFrame& frame, u64 lower, u64 upper) {
|
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);
|
auto iter = constant_info.find(constant);
|
||||||
if (iter == constant_info.end()) {
|
if (iter == constant_info.end()) {
|
||||||
ASSERT(static_cast<size_t>(current_pool_ptr - pool_begin) < pool_size);
|
ASSERT(static_cast<size_t>(current_pool_ptr - pool_begin) < pool_size);
|
||||||
|
|
|
@ -5,9 +5,10 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <map>
|
#include <bit>
|
||||||
#include <tuple>
|
#include <utility>
|
||||||
|
|
||||||
|
#include <tsl/robin_map.h>
|
||||||
#include <xbyak/xbyak.h>
|
#include <xbyak/xbyak.h>
|
||||||
|
|
||||||
#include "dynarmic/common/common_types.h"
|
#include "dynarmic/common/common_types.h"
|
||||||
|
@ -29,7 +30,13 @@ public:
|
||||||
private:
|
private:
|
||||||
static constexpr size_t align_size = 16; // bytes
|
static constexpr size_t align_size = 16; // bytes
|
||||||
|
|
||||||
std::map<std::tuple<u64, u64>, void*> constant_info;
|
struct ConstantHash {
|
||||||
|
std::size_t operator()(const std::pair<u64, u64>& constant) const noexcept {
|
||||||
|
return constant.first ^ std::rotl<u64>(constant.second, 1);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
tsl::robin_map<std::pair<u64, u64>, void*, ConstantHash> constant_info;
|
||||||
|
|
||||||
BlockOfCode& code;
|
BlockOfCode& code;
|
||||||
size_t pool_size;
|
size_t pool_size;
|
||||||
|
|
|
@ -285,7 +285,7 @@ public:
|
||||||
// Sanity note: Here imm8.Bit<0>() is guaranteed to be == 1. (imm8 can never be 0bxxxx0000)
|
// 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 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) {
|
std::string thumb16_SXTH(Reg m, Reg d) {
|
||||||
|
|
Loading…
Reference in a new issue