diff mbox

Add realmode test for CALL FAR IMM instruction

Message ID 4C74B526.1040205@cn.fujitsu.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wei Yongjun Aug. 25, 2010, 6:16 a.m. UTC
None
diff mbox

Patch

diff --git a/x86/realmode.c b/x86/realmode.c
index a833829..2e12680 100644
--- a/x86/realmode.c
+++ b/x86/realmode.c
@@ -437,6 +437,9 @@  void test_call(void)
 			    "ret\n\t"
 			    "2:\t");
 	MK_INSN(call_far1,  "lcallw *(%ebx)\n\t");
+	MK_INSN(call_far2,  ".byte 0x9a\n\t"
+			    ".word retf\n\t"
+			    ".word 0x00\n\t");
 	MK_INSN(ret_imm,    "sub $10, %sp; jmp 2f; 1: retw $10; 2: callw 1b");
 
 	exec_in_big_real_mode(&insn_call1);
@@ -453,6 +456,9 @@  void test_call(void)
 	exec_in_big_real_mode(&insn_call_far1);
 	report("call far 1", 0, 1);
 
+	exec_in_big_real_mode(&insn_call_far2);
+	report("call far 2", 0, 1);
+
 	exec_in_big_real_mode(&insn_ret_imm);
 	report("ret imm 1", 0, 1);
 }