1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 22:18:12 +00:00

LibX86+UserspaceEmulator: Devirtualize and inline more instruction code

Use some template hacks to force GCC to inline more of the instruction
decoding stuff into the UserspaceEmulator main execution loop.

This is my last optimization for today, and we've gone from ~60 seconds
when running "UserspaceEmulator UserspaceEmulator id" to ~8 seconds :^)
This commit is contained in:
Andreas Kling 2020-07-13 21:00:51 +02:00
parent f608b9d89a
commit ef84865c8c
2 changed files with 44 additions and 30 deletions

View file

@ -287,13 +287,13 @@ public:
return 0;
}
private:
// ^X86::InstructionStream
virtual bool can_read() override { return false; }
virtual u8 read8() override;
virtual u16 read16() override;
virtual u32 read32() override;
private:
// ^X86::Interpreter
virtual void AAA(const X86::Instruction&) override;
virtual void AAD(const X86::Instruction&) override;