test: Add realmode test for 2 op imul instruction (0x0f 0xaf)
PATCH 1/1 test: Add realmode test for 2 op imul instruction (0x0f 0xaf)
Signed-off-by Mohammed Gamal <[email protected]>
--- x86/realmode.c | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-)
x86/realmode.c +26 -0
@@ -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 ()
Signature · 1 line
1.7.0.4
Quoted 4 lines · Mohammed Gamal
Signed-off-by Mohammed Gamal <[email protected]>--- x86/realmode.c | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-)
Please rebase.
Quoted 9 lines · Marcelo Tosatti
Quoted 4 lines · Mohammed Gamal
Signed-off-by Mohammed Gamal <[email protected]>---
x86/realmode.c | 26 ++++++++++++++++++++++++++1 files changed, 26 insertions(+), 0 deletions(-)Please rebase.
The patch is no longer relevant. Avi already implemented similar tests