summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMai M <mathew1800@gmail.com>2021-11-22 05:16:36 +0100
committerGitHub <noreply@github.com>2021-11-22 05:16:36 +0100
commitbe238fb26a705c6ba0cc9380ce4c139d5ded2b9b (patch)
tree974cefabf3a1f3edec5ff0f4056b4601dc893b98
parentMerge pull request #7395 from Morph1984/resolve-comments (diff)
parentarm: dynarmic: Cleanup icache op handling (diff)
downloadyuzu-be238fb26a705c6ba0cc9380ce4c139d5ded2b9b.tar
yuzu-be238fb26a705c6ba0cc9380ce4c139d5ded2b9b.tar.gz
yuzu-be238fb26a705c6ba0cc9380ce4c139d5ded2b9b.tar.bz2
yuzu-be238fb26a705c6ba0cc9380ce4c139d5ded2b9b.tar.lz
yuzu-be238fb26a705c6ba0cc9380ce4c139d5ded2b9b.tar.xz
yuzu-be238fb26a705c6ba0cc9380ce4c139d5ded2b9b.tar.zst
yuzu-be238fb26a705c6ba0cc9380ce4c139d5ded2b9b.zip
-rw-r--r--src/core/arm/dynarmic/arm_dynarmic_64.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/core/arm/dynarmic/arm_dynarmic_64.cpp b/src/core/arm/dynarmic/arm_dynarmic_64.cpp
index 4e73cc03a..56836bd05 100644
--- a/src/core/arm/dynarmic/arm_dynarmic_64.cpp
+++ b/src/core/arm/dynarmic/arm_dynarmic_64.cpp
@@ -86,6 +86,26 @@ public:
num_instructions, MemoryReadCode(pc));
}
+ void InstructionCacheOperationRaised(Dynarmic::A64::InstructionCacheOperation op,
+ VAddr value) override {
+ switch (op) {
+ case Dynarmic::A64::InstructionCacheOperation::InvalidateByVAToPoU: {
+ static constexpr u64 ICACHE_LINE_SIZE = 64;
+
+ const u64 cache_line_start = value & ~(ICACHE_LINE_SIZE - 1);
+ parent.InvalidateCacheRange(cache_line_start, ICACHE_LINE_SIZE);
+ break;
+ }
+ case Dynarmic::A64::InstructionCacheOperation::InvalidateAllToPoU:
+ parent.ClearInstructionCache();
+ break;
+ case Dynarmic::A64::InstructionCacheOperation::InvalidateAllToPoUInnerSharable:
+ default:
+ LOG_DEBUG(Core_ARM, "Unprocesseed instruction cache operation: {}", op);
+ break;
+ }
+ }
+
void ExceptionRaised(u64 pc, Dynarmic::A64::Exception exception) override {
switch (exception) {
case Dynarmic::A64::Exception::WaitForInterrupt: