[PATCH 6/6] Test RET IMM instruction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Avi Kivity <avi@xxxxxxxxxx>
---
 x86/realmode.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/x86/realmode.c b/x86/realmode.c
index 42b6760..60c6212 100644
--- a/x86/realmode.c
+++ b/x86/realmode.c
@@ -627,6 +627,7 @@ void test_call(void)
 			    "ret\n\t"
 			    "2:\t");
 	MK_INSN(call_far1,  "lcallw *(%ebx)\n\t");
+	MK_INSN(ret_imm,    "sub $10, %sp; jmp 2f; 1: retw $10; 2: callw 1b");
 
 	exec_in_big_real_mode(&inregs, &outregs,
 			      insn_call1,
@@ -658,6 +659,13 @@ void test_call(void)
 		print_serial("Call far Test 1: FAIL\n");
 	else
 		print_serial("Call far Test 1: PASS\n");
+
+	exec_in_big_real_mode(&inregs, &outregs, insn_ret_imm,
+			      insn_ret_imm_end - insn_ret_imm);
+	if (!regs_equal(&inregs, &outregs, 0))
+		print_serial("ret imm Test 1: FAIL\n");
+	else
+		print_serial("ret imm Test 1: PASS\n");
 }
 
 void test_jcc_short(void)
-- 
1.7.1

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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux