jitstate: Remove code argument from ResetRSB

This commit is contained in:
MerryMage 2016-08-31 21:57:33 +01:00
parent ea6a4e82b5
commit b10c438e8e
3 changed files with 8 additions and 7 deletions

View file

@ -32,7 +32,7 @@ using namespace BackendX64;
struct Jit::Impl {
Impl(Jit* jit, UserCallbacks callbacks)
: block_of_code()
, jit_state(&block_of_code)
, jit_state()
, emitter(&block_of_code, callbacks, jit)
, callbacks(callbacks)
{}
@ -127,12 +127,12 @@ void Jit::ClearCache(bool poison_memory) {
ASSERT(!is_executing);
impl->block_of_code.ClearCache(poison_memory);
impl->emitter.ClearCache();
impl->jit_state.ResetRSB(&impl->block_of_code);
impl->jit_state.ResetRSB();
}
void Jit::Reset() {
ASSERT(!is_executing);
impl->jit_state = JitState(&impl->block_of_code);
impl->jit_state = {};
}
void Jit::HaltExecution() {

View file

@ -14,8 +14,9 @@
namespace Dynarmic {
namespace BackendX64 {
void JitState::ResetRSB(const BlockOfCode* code) {
rsb_codeptrs.fill(reinterpret_cast<u64>(code->GetReturnFromRunCodeAddress()));
void JitState::ResetRSB() {
rsb_location_descriptors.fill(0xFFFFFFFFFFFFFFFFull);
rsb_codeptrs.fill(0);
}
/**

View file

@ -18,7 +18,7 @@ class BlockOfCode;
constexpr size_t SpillCount = 64;
struct JitState {
explicit JitState(const BlockOfCode* code) { ResetRSB(code); }
JitState() { ResetRSB(); }
u32 Cpsr = 0;
std::array<u32, 16> Reg{}; // Current register file.
@ -43,7 +43,7 @@ struct JitState {
u32 rsb_ptr = 0;
std::array<u64, RSBSize> rsb_location_descriptors;
std::array<u64, RSBSize> rsb_codeptrs;
void ResetRSB(const BlockOfCode* code);
void ResetRSB();
u32 FPSCR_IDC = 0;
u32 FPSCR_UFC = 0;