From 63d3f5d19bc6d7e25b4a4e058f7ead1a48f23b98 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 13 Jul 2020 11:58:45 +0200 Subject: [PATCH] UserspaceEmulator: Implement the PUSHFD instruction --- DevTools/UserspaceEmulator/SoftCPU.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/DevTools/UserspaceEmulator/SoftCPU.cpp b/DevTools/UserspaceEmulator/SoftCPU.cpp index b56fb4f2d1..233a9d1956 100644 --- a/DevTools/UserspaceEmulator/SoftCPU.cpp +++ b/DevTools/UserspaceEmulator/SoftCPU.cpp @@ -1249,7 +1249,12 @@ void SoftCPU::POP_reg32(const X86::Instruction& insn) void SoftCPU::PUSHA(const X86::Instruction&) { TODO(); } void SoftCPU::PUSHAD(const X86::Instruction&) { TODO(); } void SoftCPU::PUSHF(const X86::Instruction&) { TODO(); } -void SoftCPU::PUSHFD(const X86::Instruction&) { TODO(); } + +void SoftCPU::PUSHFD(const X86::Instruction&) +{ + push32(m_eflags & 0x00fcffff); +} + void SoftCPU::PUSH_CS(const X86::Instruction&) { TODO(); } void SoftCPU::PUSH_DS(const X86::Instruction&) { TODO(); } void SoftCPU::PUSH_ES(const X86::Instruction&) { TODO(); }