aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Cpu
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2021-02-16 19:16:20 -0300
committerGitHub <noreply@github.com>2021-02-17 09:16:20 +1100
commit9d82d27df2d28c96f854b050c65e58eb1a48a22d (patch)
treea7e93232f788ab11dea5f93ad51dbdc5b3ac3af8 /Ryujinx.Cpu
parent715b605e9541cd5a7e4cce7609d96dbc41cd0326 (diff)
Fix memory tracking performance regression (#2026)
* Fix memory tracking performance regression * Set PTC version
Diffstat (limited to 'Ryujinx.Cpu')
-rw-r--r--Ryujinx.Cpu/MemoryManager.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Ryujinx.Cpu/MemoryManager.cs b/Ryujinx.Cpu/MemoryManager.cs
index 8c8bd3a4..c85a481e 100644
--- a/Ryujinx.Cpu/MemoryManager.cs
+++ b/Ryujinx.Cpu/MemoryManager.cs
@@ -561,7 +561,7 @@ namespace Ryujinx.Cpu
long tag = protection switch
{
MemoryPermission.None => 0L,
- MemoryPermission.Read => 2L << PointerTagBit,
+ MemoryPermission.Write => 2L << PointerTagBit,
_ => 3L << PointerTagBit
};
@@ -631,7 +631,7 @@ namespace Ryujinx.Cpu
// tracking using host guard pages in future, but also supporting platforms where this is not possible.
// Write tag includes read protection, since we don't have any read actions that aren't performed before write too.
- long tag = (write ? 3L : 2L) << PointerTagBit;
+ long tag = (write ? 3L : 1L) << PointerTagBit;
ulong endVa = (va + size + PageMask) & ~(ulong)PageMask;