Signed-off-by: Mohammed Gamal <[email protected]>
---
 x86/realmode.c |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/x86/realmode.c b/x86/realmode.c
index 603fd1f..63ee868 100644
--- a/x86/realmode.c
+++ b/x86/realmode.c
@@ -1004,6 +1004,14 @@ void test_imul()
                        "mov $4, %ecx\n\t"
                        "imul %ecx\n\t");
 
+       MK_INSN(imul16_3, "mov $2, %bx\n\t"
+                         "mov $4, %cx\n\t"
+                         "imul %bx, %cx\n\t");
+
+       MK_INSN(imul32_3, "mov $2, %ebx\n\t"
+                        "mov $4, %ecx\n\t"
+                        "imul %ebx, %ecx\n\t");
+
        exec_in_big_real_mode(&inregs, &outregs,
                              insn_imul8_1,
                              insn_imul8_1_end - insn_imul8_1);
@@ -1058,6 +1066,24 @@ void test_imul()
                print_serial("imul Test 6: FAIL\n");
        else
                print_serial("imul Test 6: PASS\n");
+
+       exec_in_big_real_mode(&inregs, &outregs,
+                              insn_imul16_3,
+                              insn_imul16_3_end - insn_imul16_3);
+
+        if (!regs_equal(&inregs, &outregs, R_BX | R_CX) || outregs.ecx != 8)
+                print_serial("imul Test 7: FAIL\n");
+        else
+                print_serial("imul Test 7: PASS\n");
+
+        exec_in_big_real_mode(&inregs, &outregs,
+                              insn_imul32_3,
+                              insn_imul32_3_end - insn_imul32_3);
+
+        if (!regs_equal(&inregs, &outregs, R_BX | R_CX) || outregs.ecx != 8)
+                print_serial("imul Test 8: FAIL\n");
+        else
+                print_serial("imul Test 8: PASS\n");
 }
 
 void test_mul()
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to