1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:38:11 +00:00

UserspaceEmulator: Fix missing sign extension in PUSH_imm8

This commit is contained in:
Andreas Kling 2020-07-12 17:44:14 +02:00
parent 94f07660e9
commit e461e3c8b0

View file

@ -1266,7 +1266,7 @@ void SoftCPU::PUSH_imm32(const X86::Instruction& insn)
void SoftCPU::PUSH_imm8(const X86::Instruction& insn)
{
ASSERT(!insn.has_operand_size_override_prefix());
push32((i32)insn.imm8());
push32(sign_extended_to<i32>(insn.imm8()));
}
void SoftCPU::PUSH_reg16(const X86::Instruction&) { TODO(); }