mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:17:45 +00:00
UserspaceEmulator: Make it possible to wrap PODs in ValueWithShadow
Instead of making it hold the shadow data as another `T`, make it hold the data as a byte array, and allow it to read the byte array as `T`. This makes it much easier to make a "read_typed" function in the MMU.
This commit is contained in:
parent
e08cf8f554
commit
f6e82a8e0a
7 changed files with 115 additions and 101 deletions
|
@ -85,7 +85,7 @@ void SimpleRegion::write8(u32 offset, ValueWithShadow<u8> value)
|
|||
{
|
||||
VERIFY(offset < size());
|
||||
m_data[offset] = value.value();
|
||||
m_shadow_data[offset] = value.shadow();
|
||||
m_shadow_data[offset] = value.shadow()[0];
|
||||
}
|
||||
|
||||
void SimpleRegion::write16(u32 offset, ValueWithShadow<u16> value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue