CPU: Make Safe{Read,Write}Memory{Byte,Halfword,Word} truely safe

This commit is contained in:
Connor McLaughlin
2021-09-10 15:53:14 +10:00
parent d2e90b0516
commit 8dcd68b0a8
2 changed files with 115 additions and 24 deletions

View File

@ -139,6 +139,8 @@ ALWAYS_INLINE bool InKernelMode()
}
// Memory reads variants which do not raise exceptions.
// These methods do not support writing to MMIO addresses with side effects, and are
// thus safe to call from the UI thread in debuggers, for example.
bool SafeReadMemoryByte(VirtualMemoryAddress addr, u8* value);
bool SafeReadMemoryHalfWord(VirtualMemoryAddress addr, u16* value);
bool SafeReadMemoryWord(VirtualMemoryAddress addr, u32* value);