block_of_code: Do not regenerate prelude when clearing cache
This commit is contained in:
parent
2a1cf94b1c
commit
4962d92b79
2 changed files with 6 additions and 7 deletions
|
@ -19,17 +19,15 @@ namespace Dynarmic {
|
||||||
namespace BackendX64 {
|
namespace BackendX64 {
|
||||||
|
|
||||||
BlockOfCode::BlockOfCode(UserCallbacks cb) : Xbyak::CodeGenerator(128 * 1024 * 1024), cb(cb) {
|
BlockOfCode::BlockOfCode(UserCallbacks cb) : Xbyak::CodeGenerator(128 * 1024 * 1024), cb(cb) {
|
||||||
ClearCache();
|
|
||||||
}
|
|
||||||
|
|
||||||
void BlockOfCode::ClearCache() {
|
|
||||||
consts.~Consts();
|
|
||||||
new (&consts) Consts();
|
|
||||||
reset();
|
|
||||||
GenConstants();
|
GenConstants();
|
||||||
GenRunCode();
|
GenRunCode();
|
||||||
GenReturnFromRunCode();
|
GenReturnFromRunCode();
|
||||||
GenMemoryAccessors();
|
GenMemoryAccessors();
|
||||||
|
user_code_begin = getCurr<CodePtr>();
|
||||||
|
}
|
||||||
|
|
||||||
|
void BlockOfCode::ClearCache() {
|
||||||
|
SetCodePtr(user_code_begin);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t BlockOfCode::RunCode(JitState* jit_state, CodePtr basic_block, size_t cycles_to_run) const {
|
size_t BlockOfCode::RunCode(JitState* jit_state, CodePtr basic_block, size_t cycles_to_run) const {
|
||||||
|
|
|
@ -147,6 +147,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
UserCallbacks cb;
|
UserCallbacks cb;
|
||||||
|
CodePtr user_code_begin;
|
||||||
|
|
||||||
struct Consts {
|
struct Consts {
|
||||||
Xbyak::Label FloatPositiveZero32;
|
Xbyak::Label FloatPositiveZero32;
|
||||||
|
|
Loading…
Reference in a new issue