From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: [PATCH unit-test] test aad instruction Date: Mon, 10 Dec 2012 11:44:35 +0200 Message-ID: <20121210094435.GJ19514@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: mtosatti@redhat.com To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:21285 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753193Ab2LJJog (ORCPT ); Mon, 10 Dec 2012 04:44:36 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBA9iakC016690 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 10 Dec 2012 04:44:36 -0500 Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: Add test for aad instruction emulation. Signed-off-by: Gleb Natapov diff --git a/x86/realmode.c b/x86/realmode.c index 82a66b3..549b36a 100644 --- a/x86/realmode.c +++ b/x86/realmode.c @@ -1375,6 +1375,15 @@ static void test_bswap(void) report("bswap", R_CX, outregs.ecx == 0x78563412); } +static void test_aad(void) +{ + MK_INSN(aad, "aad"); + + inregs.eax = 0x12345678; + exec_in_big_real_mode(&insn_aad); + report("aad", R_AX, outregs.eax == 0x123400d4); +} + void realmode_start(void) { test_null(); @@ -1414,6 +1423,7 @@ void realmode_start(void) test_lahf(); test_movzx_movsx(); test_bswap(); + test_aad(); exit(0); } -- Gleb.