From patchwork Sun Aug 16 00:54:55 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mohammed Gamal X-Patchwork-Id: 41658 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7G0t21u018974 for ; Sun, 16 Aug 2009 00:55:03 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753033AbZHPAy6 (ORCPT ); Sat, 15 Aug 2009 20:54:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753050AbZHPAy6 (ORCPT ); Sat, 15 Aug 2009 20:54:58 -0400 Received: from mail-bw0-f222.google.com ([209.85.218.222]:51522 "EHLO mail-bw0-f222.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753033AbZHPAy6 (ORCPT ); Sat, 15 Aug 2009 20:54:58 -0400 Received: by bwz22 with SMTP id 22so1720939bwz.18 for ; Sat, 15 Aug 2009 17:54:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=m5uHfnslYxexaUtiCBWOmLhqm905Ag5pIw6m6gLesWg=; b=w2qy3ML/HDedVKbWxs/Sb/Sil01NEktrl23osxC2o1xmjpLmwU43PjUhrRz1WYHF6t 0wlbBcxpqZjXOT5QJTe+67DByYliw4xZwW6vS45+Oidm00PLwvUZBWipFGkJGoXHRdTm tsFKH1YunvL6ziDLjdunKbvQtHoQaCjanPzqg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=AW9U37e69JCo339gm+sP5chMgJDHK8JKB8dK5x79YubC8UISVad6XM0TNfn9xBbv2E utdhvr9EJjdSNTJGEu4Tj5kY4ddmN/Mt4mEUb2b3zgCuqChZswIcrfMZzcUfc17SE9I2 +w7ASaUBxEFMZu12tr+sNmLdeUmR+6zjFrlXc= Received: by 10.103.37.34 with SMTP id p34mr936310muj.84.1250384098065; Sat, 15 Aug 2009 17:54:58 -0700 (PDT) Received: from localhost ([188.51.98.214]) by mx.google.com with ESMTPS id 14sm13277213muo.33.2009.08.15.17.54.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 15 Aug 2009 17:54:57 -0700 (PDT) Date: Sun, 16 Aug 2009 03:54:55 +0300 From: Mohammed Gamal To: avi@redhat.com Cc: kvm@vger.kernel.org Subject: [PATCH] Add push es instruction test in test harness Message-ID: <20090816005455.GB19989@mohd-laptop> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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) + print_serial("Push ES Test: FAIL\n"); +} + void test_null(void) { struct regs inregs = { 0 }, outregs; @@ -492,6 +507,7 @@ void start(void) test_call(); /* long jmp test uses call near so test it after testing call */ test_long_jmp(); + test_push_es(); exit(0); }