1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-10 11:57:35 +00:00

UserspaceEmulator: Implement XOR_RM32_reg32

Note that this is a partial implementation since we don't have support
for memory r/m variants yet.
This commit is contained in:
Andreas Kling 2020-07-07 21:35:23 +02:00
parent 934f0b999e
commit 8ab601f9e1

View file

@ -519,7 +519,21 @@ void SoftCPU::XOR_RM16_imm8(const X86::Instruction&) { TODO(); }
void SoftCPU::XOR_RM16_reg16(const X86::Instruction&) { TODO(); }
void SoftCPU::XOR_RM32_imm32(const X86::Instruction&) { TODO(); }
void SoftCPU::XOR_RM32_imm8(const X86::Instruction&) { TODO(); }
void SoftCPU::XOR_RM32_reg32(const X86::Instruction&) { TODO(); }
void SoftCPU::XOR_RM32_reg32(const X86::Instruction& insn)
{
ASSERT(insn.modrm().is_register());
auto& dest = *m_reg32_table[insn.modrm().register_index()];
auto src = *m_reg32_table[insn.register_index()];
dest ^= src;
set_cf(false);
set_of(false);
set_zf(dest == 0);
set_sf(dest & 0x80000000);
// FIXME: set_pf
}
void SoftCPU::XOR_RM8_imm8(const X86::Instruction&) { TODO(); }
void SoftCPU::XOR_RM8_reg8(const X86::Instruction&) { TODO(); }
void SoftCPU::XOR_reg16_RM16(const X86::Instruction&) { TODO(); }