From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] Add push es instruction test in test harness Date: Sun, 16 Aug 2009 11:44:12 +0300 Message-ID: <4A87C6DC.2000604@redhat.com> References: <20090816005455.GB19989@mohd-laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Mohammed Gamal Return-path: Received: from mx2.redhat.com ([66.187.237.31]:60436 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751480AbZHPIoO (ORCPT ); Sun, 16 Aug 2009 04:44:14 -0400 In-Reply-To: <20090816005455.GB19989@mohd-laptop> Sender: kvm-owner@vger.kernel.org List-ID: On 08/16/2009 03:54 AM, Mohammed Gamal wrote: > Signed-off-by: Mohammed Gamal > --- > kvm/user/test/x86/realmode.c | 16 ++++++++++++++++ > 1 files changed, 16 insertions(+), 0 deletions(-) > > diff --git a/kvm/user/test/x86/realmode.c b/kvm/user/test/x86/realmode.c > index 755b5d1..8db2c7a 100644 > --- a/kvm/user/test/x86/realmode.c > +++ b/kvm/user/test/x86/realmode.c > @@ -468,6 +468,21 @@ void test_long_jmp() > print_serial("Long JMP Test: FAIL\n"); > } > > +void test_push_es() > +{ > + struct regs inregs = { 0 }, outregs; > + > + MK_INSN(push_es, "mov $0x1234, %ax\n\t" > + "mov %ax, %es\n\t" > + "push %es\n\t" > + "movw (%esp), %bx \n\t"); > + exec_in_big_real_mode(&inregs,&outregs, > + insn_push_es, > + insn_push_es_end - insn_push_es); > + if(!regs_equal(&inregs,&outregs, R_AX|R_BX|R_SP) || outregs.eax != 0x1234) > You need to check bx here, otherwise the test will always succeed. > + print_serial("Push ES Test: FAIL\n"); > +} > + > error compiling committee.c: too many arguments to function