All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] test: Add realmode test for stc instruction
@ 2010-08-05 12:43 Mohammed Gamal
  2010-08-05 13:30 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Mohammed Gamal @ 2010-08-05 12:43 UTC (permalink / raw)
  To: avi; +Cc: mtosatti, kvm, Mohammed Gamal

Signed-off-by: Mohammed Gamal <m.gamal005@gmail.com>
---
 x86/realmode.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/x86/realmode.c b/x86/realmode.c
index 7534da5..ead5021 100644
--- a/x86/realmode.c
+++ b/x86/realmode.c
@@ -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))
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-08-05 13:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-05 12:43 [PATCH] test: Add realmode test for stc instruction Mohammed Gamal
2010-08-05 13:30 ` Avi Kivity

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.