From: Mohammed Gamal Subject: [PATCH] kvm: testsuite: Add test for 'call near absolute' Date: Mon, 8 Sep 2008 21:46:16 +0300 Message-ID: <20080908184616.GA31824@mohd-laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: avi@qumranet.com To: kvm@vger.kernel.org Return-path: Received: from yx-out-2324.google.com ([74.125.44.30]:29303 "EHLO yx-out-2324.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753081AbYIHSq4 (ORCPT ); Mon, 8 Sep 2008 14:46:56 -0400 Received: by yx-out-2324.google.com with SMTP id 8so902282yxm.1 for ; Mon, 08 Sep 2008 11:46:55 -0700 (PDT) Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: Add test for 'call near abolsute' instruction to the real mode test harness Signed-off-by: Mohammed Gamal --- 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