hypervisor: emulator: Emulate MOVZX

MOV R/RM is a special case of MOVZX, so we generalize the mov_r_rm macro
to make it support both instructions.

Fixes: #2227

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Samuel Ortiz
2021-02-03 00:02:50 +01:00
parent 89008a49cf
commit 5ada3f59c8
2 changed files with 51 additions and 6 deletions
+7 -1
View File
@@ -518,7 +518,13 @@ impl<'a, T: CpuStateManager> Emulator<'a, T> {
(mov, Mov_rm32_imm32),
(mov, Mov_rm32_r32),
(mov, Mov_rm64_imm32),
(mov, Mov_rm64_r64)
(mov, Mov_rm64_r64),
// MOVZX
(mov, Movzx_r16_rm8),
(mov, Movzx_r32_rm8),
(mov, Movzx_r64_rm8),
(mov, Movzx_r32_rm16),
(mov, Movzx_r64_rm16)
);
handler