From patchwork Wed Apr 24 10:50:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gleb Natapov X-Patchwork-Id: 2483681 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id D4B373FCA5 for ; Wed, 24 Apr 2013 10:50:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758556Ab3DXKum (ORCPT ); Wed, 24 Apr 2013 06:50:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12955 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757972Ab3DXKul (ORCPT ); Wed, 24 Apr 2013 06:50:41 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3OAofA7031712 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 24 Apr 2013 06:50:41 -0400 Received: from dhcp-1-237.tlv.redhat.com (dhcp-4-26.tlv.redhat.com [10.35.4.26]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3OAof1w032603; Wed, 24 Apr 2013 06:50:41 -0400 Received: by dhcp-1-237.tlv.redhat.com (Postfix, from userid 13519) id 4585C18D3BE; Wed, 24 Apr 2013 13:50:40 +0300 (IDT) Date: Wed, 24 Apr 2013 13:50:40 +0300 From: Gleb Natapov To: kvm@vger.kernel.org Cc: mtosatti@redhat.com, pbonzini@redhat.com Subject: [PATCH unit test] add test for "mov[zs]x %ah, ..." instruction Message-ID: <20130424105040.GM12401@redhat.com> MIME-Version: 1.0 Content-Disposition: inline X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Signed-off-by: Gleb Natapov --- Gleb. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/x86/realmode.c b/x86/realmode.c index f5426e0..91c93a9 100644 --- a/x86/realmode.c +++ b/x86/realmode.c @@ -1358,12 +1358,19 @@ static void test_movzx_movsx(void) { MK_INSN(movsx, "movsx %al, %ebx"); MK_INSN(movzx, "movzx %al, %ebx"); + MK_INSN(movzsah, "movsx %ah, %ebx"); + MK_INSN(movzxah, "movzx %ah, %ebx"); inregs.eax = 0x1234569c; + inregs.esp = 0xffff; exec_in_big_real_mode(&insn_movsx); report("movsx", R_BX, outregs.ebx == (signed char)inregs.eax); exec_in_big_real_mode(&insn_movzx); report("movzx", R_BX, outregs.ebx == (unsigned char)inregs.eax); + exec_in_big_real_mode(&insn_movzsah); + report("movsx ah", R_BX, outregs.ebx == (signed char)(inregs.eax>>8)); + exec_in_big_real_mode(&insn_movzxah); + report("movzx ah", R_BX, outregs.ebx == (unsigned char)(inregs.eax >> 8)); } static void test_bswap(void)