1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 06:28:13 +00:00

UserspaceEmulator+LibX86: Clean up some obnoxious template spam

Don't require clients to templatize modrm().read{8,16,32,64}() with
the ValueWithShadow type when we can figure it out automatically.
The main complication here is that ValueWithShadow is a UE concept
while the MemoryOrRegisterReference inlines exist at the lower LibX86
layer and so doesn't have direct access to those types. But that's
nothing we can't solve with some simple template trickery. :^)
This commit is contained in:
Andreas Kling 2020-09-23 21:12:14 +02:00
parent 993ceb66fd
commit 60c2fba9b9
3 changed files with 110 additions and 105 deletions

View file

@ -53,6 +53,11 @@ class SoftCPU final
: public X86::Interpreter
, public X86::InstructionStream {
public:
using ValueWithShadowType8 = ValueWithShadow<u8>;
using ValueWithShadowType16 = ValueWithShadow<u16>;
using ValueWithShadowType32 = ValueWithShadow<u32>;
using ValueWithShadowType64 = ValueWithShadow<u64>;
explicit SoftCPU(Emulator&);
void dump() const;