public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Mohammed Gamal <m.gamal005@gmail.com>
To: kvm@vger.kernel.org
Cc: avi@qumranet.com
Subject: [PATCH] kvm: testsuite: Add test for 'call near absolute'
Date: Mon, 8 Sep 2008 21:46:16 +0300	[thread overview]
Message-ID: <20080908184616.GA31824@mohd-laptop> (raw)

Add test for 'call near abolsute' instruction to the real mode test harness

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

diff --git a/user/test/x86/realmode.c b/user/test/x86/realmode.c
index 5f0ca0f..756725f 100644
--- a/user/test/x86/realmode.c
+++ b/user/test/x86/realmode.c
@@ -279,6 +279,24 @@ void test_io(struct regs *inregs, struct regs *outregs)
 
 }
 
+void test_call(struct regs *inregs, struct regs *outregs)
+{
+	MK_INSN(call1, "mov $0x4000, %eax \n\t"
+		       "call *%eax\n\t");
+
+	exec_in_big_real_mode(inregs, outregs,
+		   	      insn_call1,
+			      insn_call1_end - insn_call1);
+}
+
+void line_out()
+{	
+	/* Just output a blank line */
+	asm(".org 0x4000 \n\t"
+	    "mov $10, %al \n\t"
+	    "out %al, $0xf1 \n\t");
+}
+
 void start(void)
 {
 	struct regs inregs = { 0 }, outregs;
@@ -287,6 +305,7 @@ void start(void)
 	exec_in_big_real_mode(&inregs, &outregs, 0, 0);
 	if (!regs_equal(&inregs, &outregs, 0))
 		print_serial("null test: FAIL\n");
+	test_call(&inregs, &outregs);
 	test_mov_imm(&inregs, &outregs);
 	test_io(&inregs, &outregs);
 	test_eflags_insn(&inregs, &outregs);
-- 
1.5.4.3



             reply	other threads:[~2008-09-08 18:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-08 18:46 Mohammed Gamal [this message]
2008-09-09 13:39 ` [PATCH] kvm: testsuite: Add test for 'call near absolute' Avi Kivity
  -- strict thread matches above, loose matches on Subject: below --
2008-09-09 14:39 Mohammed Gamal
2008-09-10 15:31 ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080908184616.GA31824@mohd-laptop \
    --to=m.gamal005@gmail.com \
    --cc=avi@qumranet.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox