From fb6d838bd93f4faaf9619f2d755b049b3cedccd6 Mon Sep 17 00:00:00 2001 From: Mat M Date: Thu, 1 Sep 2016 04:47:09 -0400 Subject: [PATCH] dynarmic: Remove poison_memory ClearCache parameter (#1) Unused since the switch to Xbyak --- include/dynarmic/dynarmic.h | 3 +-- src/backend_x64/block_of_code.cpp | 4 ++-- src/backend_x64/block_of_code.h | 2 +- src/backend_x64/interface_x64.cpp | 4 ++-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/include/dynarmic/dynarmic.h b/include/dynarmic/dynarmic.h index 83d72d42..4684b705 100644 --- a/include/dynarmic/dynarmic.h +++ b/include/dynarmic/dynarmic.h @@ -35,9 +35,8 @@ public: /** * Clears the code cache of all compiled code. * Cannot be called from a callback. - * @param poison_memory If true, poisons memory to crash if any stray code pointers are called. */ - void ClearCache(bool poison_memory = true); + void ClearCache(); /** * Reset CPU state to state at startup. Does not clear code cache. diff --git a/src/backend_x64/block_of_code.cpp b/src/backend_x64/block_of_code.cpp index 75ba0922..a020d23a 100644 --- a/src/backend_x64/block_of_code.cpp +++ b/src/backend_x64/block_of_code.cpp @@ -18,10 +18,10 @@ namespace Dynarmic { namespace BackendX64 { BlockOfCode::BlockOfCode(UserCallbacks cb) : Xbyak::CodeGenerator(128 * 1024 * 1024), cb(cb) { - ClearCache(false); + ClearCache(); } -void BlockOfCode::ClearCache(bool poison_memory) { +void BlockOfCode::ClearCache() { consts.~Consts(); new (&consts) Consts(); reset(); diff --git a/src/backend_x64/block_of_code.h b/src/backend_x64/block_of_code.h index 9dda3c4a..a2280caf 100644 --- a/src/backend_x64/block_of_code.h +++ b/src/backend_x64/block_of_code.h @@ -21,7 +21,7 @@ public: explicit BlockOfCode(UserCallbacks cb); /// Clears this block of code and resets code pointer to beginning. - void ClearCache(bool poison_memory); + void ClearCache(); /// Runs emulated code for approximately `cycles_to_run` cycles. size_t RunCode(JitState* jit_state, CodePtr basic_block, size_t cycles_to_run) const; diff --git a/src/backend_x64/interface_x64.cpp b/src/backend_x64/interface_x64.cpp index 56c1c176..326a98bb 100644 --- a/src/backend_x64/interface_x64.cpp +++ b/src/backend_x64/interface_x64.cpp @@ -123,9 +123,9 @@ size_t Jit::Run(size_t cycle_count) { return cycles_executed; } -void Jit::ClearCache(bool poison_memory) { +void Jit::ClearCache() { ASSERT(!is_executing); - impl->block_of_code.ClearCache(poison_memory); + impl->block_of_code.ClearCache(); impl->emitter.ClearCache(); impl->jit_state.ResetRSB(); }