summaryrefslogtreecommitdiff
path: root/DevTools/UserspaceEmulator/SimpleRegion.h
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2020-09-23 14:45:43 -0400
committerGitHub <noreply@github.com>2020-09-23 20:45:43 +0200
commitf1c0f661f44b54894aee0efb5c76f32af33430d6 (patch)
tree58790944a447f41802df96074051bd9855e7bc51 /DevTools/UserspaceEmulator/SimpleRegion.h
parent1fa5a526e8a75ecc32f38b949375da1e7c8ba7aa (diff)
downloadserenity-f1c0f661f44b54894aee0efb5c76f32af33430d6.zip
UserspaceEmulator+LibX86: Add support for 64-bit memory reads and writes (#3584)
This is useful for reading and writing doubles for #3329. It is also useful for emulating 64-bit binaries. MemoryOrRegisterReference assumes that 64-bit values are always memory references since that's enough for fpu support. If we ever want to emulate 64-bit binaries, that part will need minor updating.
Diffstat (limited to 'DevTools/UserspaceEmulator/SimpleRegion.h')
-rw-r--r--DevTools/UserspaceEmulator/SimpleRegion.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/DevTools/UserspaceEmulator/SimpleRegion.h b/DevTools/UserspaceEmulator/SimpleRegion.h
index 85055cbe73..4a65593041 100644
--- a/DevTools/UserspaceEmulator/SimpleRegion.h
+++ b/DevTools/UserspaceEmulator/SimpleRegion.h
@@ -38,10 +38,12 @@ public:
virtual ValueWithShadow<u8> read8(u32 offset) override;
virtual ValueWithShadow<u16> read16(u32 offset) override;
virtual ValueWithShadow<u32> read32(u32 offset) override;
+ virtual ValueWithShadow<u64> read64(u32 offset) override;
virtual void write8(u32 offset, ValueWithShadow<u8>) override;
virtual void write16(u32 offset, ValueWithShadow<u16>) override;
virtual void write32(u32 offset, ValueWithShadow<u32>) override;
+ virtual void write64(u32 offset, ValueWithShadow<u64>) override;
u8* data() { return m_data; }
u8* shadow_data() { return m_shadow_data; }