mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:58:11 +00:00
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.
This commit is contained in:
parent
1fa5a526e8
commit
f1c0f661f4
12 changed files with 156 additions and 0 deletions
|
@ -111,6 +111,8 @@ private:
|
|||
template<typename T>
|
||||
ALWAYS_INLINE ValueWithShadow<T> shadow_wrap_as_initialized(T value)
|
||||
{
|
||||
if constexpr (sizeof(T) == 8)
|
||||
return { value, 0x01010101'01010101LLU };
|
||||
if constexpr (sizeof(T) == 4)
|
||||
return { value, 0x01010101 };
|
||||
if constexpr (sizeof(T) == 2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue