mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:47:44 +00:00
UserspaceEmulator: Implement PUSH_{CS,DS,ES,FS,GS,SS}
You can now push the segment registers on the stack! :^)
This commit is contained in:
parent
b6472c250c
commit
bd1f39ebaa
1 changed files with 29 additions and 6 deletions
|
@ -2409,11 +2409,30 @@ void SoftCPU::PUSHFD(const X86::Instruction&)
|
||||||
push32(shadow_wrap_as_initialized(m_eflags & 0x00fcffff));
|
push32(shadow_wrap_as_initialized(m_eflags & 0x00fcffff));
|
||||||
}
|
}
|
||||||
|
|
||||||
void SoftCPU::PUSH_CS(const X86::Instruction&) { TODO_INSN(); }
|
void SoftCPU::PUSH_CS(X86::Instruction const&)
|
||||||
void SoftCPU::PUSH_DS(const X86::Instruction&) { TODO_INSN(); }
|
{
|
||||||
void SoftCPU::PUSH_ES(const X86::Instruction&) { TODO_INSN(); }
|
push16(shadow_wrap_as_initialized(cs()));
|
||||||
void SoftCPU::PUSH_FS(const X86::Instruction&) { TODO_INSN(); }
|
}
|
||||||
void SoftCPU::PUSH_GS(const X86::Instruction&) { TODO_INSN(); }
|
|
||||||
|
void SoftCPU::PUSH_DS(X86::Instruction const&)
|
||||||
|
{
|
||||||
|
push16(shadow_wrap_as_initialized(ds()));
|
||||||
|
}
|
||||||
|
|
||||||
|
void SoftCPU::PUSH_ES(X86::Instruction const&)
|
||||||
|
{
|
||||||
|
push16(shadow_wrap_as_initialized(es()));
|
||||||
|
}
|
||||||
|
|
||||||
|
void SoftCPU::PUSH_FS(X86::Instruction const&)
|
||||||
|
{
|
||||||
|
push16(shadow_wrap_as_initialized(fs()));
|
||||||
|
}
|
||||||
|
|
||||||
|
void SoftCPU::PUSH_GS(X86::Instruction const&)
|
||||||
|
{
|
||||||
|
push16(shadow_wrap_as_initialized(gs()));
|
||||||
|
}
|
||||||
|
|
||||||
void SoftCPU::PUSH_RM16(const X86::Instruction& insn)
|
void SoftCPU::PUSH_RM16(const X86::Instruction& insn)
|
||||||
{
|
{
|
||||||
|
@ -2426,7 +2445,11 @@ void SoftCPU::PUSH_RM32(const X86::Instruction& insn)
|
||||||
}
|
}
|
||||||
|
|
||||||
void SoftCPU::PUSH_SP_8086_80186(const X86::Instruction&) { TODO_INSN(); }
|
void SoftCPU::PUSH_SP_8086_80186(const X86::Instruction&) { TODO_INSN(); }
|
||||||
void SoftCPU::PUSH_SS(const X86::Instruction&) { TODO_INSN(); }
|
|
||||||
|
void SoftCPU::PUSH_SS(X86::Instruction const&)
|
||||||
|
{
|
||||||
|
push16(shadow_wrap_as_initialized(ss()));
|
||||||
|
}
|
||||||
|
|
||||||
void SoftCPU::PUSH_imm16(const X86::Instruction& insn)
|
void SoftCPU::PUSH_imm16(const X86::Instruction& insn)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue