diff options
| author | 2021-11-21 21:24:07 -0500 | |
|---|---|---|
| committer | 2021-11-21 22:44:13 -0500 | |
| commit | 4d9c9e567ef6c44967b639471613a0328dcbf833 (patch) | |
| tree | 974cefabf3a1f3edec5ff0f4056b4601dc893b98 /src | |
| parent | arm: dynarmic: Implement icache op handling for 'ic iallu' instruction (diff) | |
| download | yuzu-4d9c9e567ef6c44967b639471613a0328dcbf833.tar.gz yuzu-4d9c9e567ef6c44967b639471613a0328dcbf833.tar.xz yuzu-4d9c9e567ef6c44967b639471613a0328dcbf833.zip | |
arm: dynarmic: Cleanup icache op handling
Diffstat (limited to '')
| -rw-r--r-- | src/core/arm/dynarmic/arm_dynarmic_64.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/core/arm/dynarmic/arm_dynarmic_64.cpp b/src/core/arm/dynarmic/arm_dynarmic_64.cpp index 8fe83413c..56836bd05 100644 --- a/src/core/arm/dynarmic/arm_dynarmic_64.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic_64.cpp | |||
| @@ -88,22 +88,21 @@ public: | |||
| 88 | 88 | ||
| 89 | void InstructionCacheOperationRaised(Dynarmic::A64::InstructionCacheOperation op, | 89 | void InstructionCacheOperationRaised(Dynarmic::A64::InstructionCacheOperation op, |
| 90 | VAddr value) override { | 90 | VAddr value) override { |
| 91 | constexpr u64 ICACHE_LINE_SIZE = 64; | ||
| 92 | u64 cache_line_start; | ||
| 93 | |||
| 94 | switch (op) { | 91 | switch (op) { |
| 95 | case Dynarmic::A64::InstructionCacheOperation::InvalidateByVAToPoU: | 92 | case Dynarmic::A64::InstructionCacheOperation::InvalidateByVAToPoU: { |
| 96 | cache_line_start = value & ~(ICACHE_LINE_SIZE - 1); | 93 | static constexpr u64 ICACHE_LINE_SIZE = 64; |
| 97 | parent.InvalidateCacheRange(cache_line_start, ICACHE_LINE_SIZE); | ||
| 98 | return; | ||
| 99 | 94 | ||
| 95 | const u64 cache_line_start = value & ~(ICACHE_LINE_SIZE - 1); | ||
| 96 | parent.InvalidateCacheRange(cache_line_start, ICACHE_LINE_SIZE); | ||
| 97 | break; | ||
| 98 | } | ||
| 100 | case Dynarmic::A64::InstructionCacheOperation::InvalidateAllToPoU: | 99 | case Dynarmic::A64::InstructionCacheOperation::InvalidateAllToPoU: |
| 101 | parent.ClearInstructionCache(); | 100 | parent.ClearInstructionCache(); |
| 102 | return; | 101 | break; |
| 103 | |||
| 104 | case Dynarmic::A64::InstructionCacheOperation::InvalidateAllToPoUInnerSharable: | 102 | case Dynarmic::A64::InstructionCacheOperation::InvalidateAllToPoUInnerSharable: |
| 105 | default: | 103 | default: |
| 106 | LOG_DEBUG(Core_ARM, "Unprocesseed instruction cache operation"); | 104 | LOG_DEBUG(Core_ARM, "Unprocesseed instruction cache operation: {}", op); |
| 105 | break; | ||
| 107 | } | 106 | } |
| 108 | } | 107 | } |
| 109 | 108 | ||