Skip to contentSkip to conversation

test: Add realmode test for stc instruction

PATCH Applied Mohammed Gamal 2 participants 2 messages Aug 5, 2010 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test: Add realmode test for stc instruction

---
 x86/realmode.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
x86/realmode.c +9 -0
index 7534da5..ead5021 100644
@@ -462,6 +462,7 @@ void test_eflags_insn(void)
 {
 	struct regs inregs = { 0 }, outregs;
 	MK_INSN(clc, "clc");
+	MK_INSN(stc, "stc");
 	MK_INSN(cli, "cli");
 	MK_INSN(sti, "sti");
 	MK_INSN(cld, "cld");
@@ -476,6 +477,14 @@ void test_eflags_insn(void)
 		print_serial("clc test: PASS\n");
 
 	exec_in_big_real_mode(&inregs, &outregs,
+			      insn_stc,
+			      insn_stc_end - insn_stc);
+	if (!(outregs.eflags & 1))
+		print_serial("stc test: FAIL\n");
+	else
+		print_serial("stc test: PASS\n");
+
+	exec_in_big_real_mode(&inregs, &outregs,
 			      insn_cli,
 			      insn_cli_end - insn_cli);
 	if (outregs.eflags & (1 << 9))
Signature · 1 line
1.7.0.4