mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 07:18:13 +00:00
UserspaceEmulator: Implement the 32-bit LEAVE instruction
The 16-bit variant is a bit weird. Let's wait until someone needs it.
This commit is contained in:
parent
321ee72fe7
commit
6c7ae794ce
1 changed files with 7 additions and 1 deletions
|
@ -716,7 +716,13 @@ void SoftCPU::LAR_reg32_RM32(const X86::Instruction&) { TODO(); }
|
|||
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::LEAVE32(const X86::Instruction&)
|
||||
{
|
||||
u32 new_ebp = read_memory32({ ss(), ebp() });
|
||||
set_esp(ebp() + 4);
|
||||
set_ebp(new_ebp);
|
||||
}
|
||||
|
||||
void SoftCPU::LEA_reg16_mem16(const X86::Instruction& insn)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue