From 00cd142365d5d99a42a48fa08ef5aa7874729a0c Mon Sep 17 00:00:00 2001 From: Nemoumbra Date: Fri, 6 Sep 2024 23:11:39 +0300 Subject: [PATCH] Comment fix + new QOL method --- Core/MIPS/IR/IRJit.cpp | 3 ++- Core/MIPS/IR/IRJit.h | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Core/MIPS/IR/IRJit.cpp b/Core/MIPS/IR/IRJit.cpp index f1d6724f45..2b5c4bbc75 100644 --- a/Core/MIPS/IR/IRJit.cpp +++ b/Core/MIPS/IR/IRJit.cpp @@ -172,7 +172,8 @@ bool IRJit::CompileBlock(u32 em_address, std::vector &instructions, u32 } if (!CompileNativeBlock(&blocks_, block_num, preload)) return false; - // Overwrites the first instruction, and also updates stats. + + // Updates stats, also patches the first MIPS instruction into an emuhack if 'preload == false' blocks_.FinalizeBlock(block_num, preload); if (!preload) FinalizeNativeBlock(&blocks_, block_num); diff --git a/Core/MIPS/IR/IRJit.h b/Core/MIPS/IR/IRJit.h index 39d4f2a245..c8ef2d5192 100644 --- a/Core/MIPS/IR/IRJit.h +++ b/Core/MIPS/IR/IRJit.h @@ -91,6 +91,9 @@ public: u32 GetOriginalStart() const { return origAddr_; } + u64 GetHash() const { + return hash_; + } void Finalize(int number); void Destroy(int number);