mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:28:11 +00:00
UserspaceEmulator+LibX86: Implement the LEA instruction
This piggybacks nicely on Instruction's ModR/M resolution code. :^)
This commit is contained in:
parent
9257657340
commit
97f4cebc8d
2 changed files with 19 additions and 10 deletions
|
@ -625,8 +625,17 @@ void SoftCPU::LDS_reg16_mem16(const X86::Instruction&) { TODO(); }
|
|||
void SoftCPU::LDS_reg32_mem32(const X86::Instruction&) { TODO(); }
|
||||
void SoftCPU::LEAVE16(const X86::Instruction&) { TODO(); }
|
||||
void SoftCPU::LEAVE32(const X86::Instruction&) { TODO(); }
|
||||
void SoftCPU::LEA_reg16_mem16(const X86::Instruction&) { TODO(); }
|
||||
void SoftCPU::LEA_reg32_mem32(const X86::Instruction&) { TODO(); }
|
||||
|
||||
void SoftCPU::LEA_reg16_mem16(const X86::Instruction& insn)
|
||||
{
|
||||
gpr16(insn.reg16()) = insn.modrm().resolve(*this, insn.segment_prefix()).offset();
|
||||
}
|
||||
|
||||
void SoftCPU::LEA_reg32_mem32(const X86::Instruction& insn)
|
||||
{
|
||||
gpr32(insn.reg32()) = insn.modrm().resolve(*this, insn.segment_prefix()).offset();
|
||||
}
|
||||
|
||||
void SoftCPU::LES_reg16_mem16(const X86::Instruction&) { TODO(); }
|
||||
void SoftCPU::LES_reg32_mem32(const X86::Instruction&) { TODO(); }
|
||||
void SoftCPU::LFS_reg16_mem16(const X86::Instruction&) { TODO(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue