mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 15:07:45 +00:00
UserspaceEmulator: Keep Emulator& closer to the action in some places
This avoids the cost of calling Emulator::the() in some very hot paths.
This commit is contained in:
parent
d14695f823
commit
1965fc5b98
9 changed files with 127 additions and 70 deletions
|
@ -36,10 +36,13 @@
|
|||
|
||||
namespace UserspaceEmulator {
|
||||
|
||||
class Emulator;
|
||||
class SharedBufferRegion;
|
||||
|
||||
class SoftMMU {
|
||||
public:
|
||||
explicit SoftMMU(Emulator&);
|
||||
|
||||
ValueWithShadow<u8> read8(X86::LogicalAddress);
|
||||
ValueWithShadow<u16> read16(X86::LogicalAddress);
|
||||
ValueWithShadow<u32> read32(X86::LogicalAddress);
|
||||
|
@ -80,6 +83,8 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
Emulator& m_emulator;
|
||||
|
||||
Region* m_page_to_region_map[786432];
|
||||
|
||||
OwnPtr<Region> m_tls_region;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue