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

LibX86+UserspaceEmulator: Don't store a32 in MemoryOrRegisterReference

The a32 bit tells us whether a memory address is 32-bit or not.
We already have this information in Instruction, so just plumb that
around instead of double-caching the bit.
This commit is contained in:
Andreas Kling 2020-07-14 19:07:32 +02:00
parent bc66221ee3
commit 6a926a8c61
3 changed files with 38 additions and 45 deletions

View file

@ -1026,12 +1026,12 @@ void SoftCPU::LEAVE32(const X86::Instruction&)
void SoftCPU::LEA_reg16_mem16(const X86::Instruction& insn)
{
gpr16(insn.reg16()) = insn.modrm().resolve(*this, insn.segment_prefix()).offset();
gpr16(insn.reg16()) = insn.modrm().resolve(*this, insn).offset();
}
void SoftCPU::LEA_reg32_mem32(const X86::Instruction& insn)
{
gpr32(insn.reg32()) = insn.modrm().resolve(*this, insn.segment_prefix()).offset();
gpr32(insn.reg32()) = insn.modrm().resolve(*this, insn).offset();
}
void SoftCPU::LES_reg16_mem16(const X86::Instruction&) { TODO(); }