diff mbox

[unit-test] test aad instruction

Message ID 20121210094435.GJ19514@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Gleb Natapov Dec. 10, 2012, 9:44 a.m. UTC
Add test for aad instruction emulation.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
--
			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

Comments

Marcelo Tosatti Dec. 14, 2012, 12:28 a.m. UTC | #1
On Mon, Dec 10, 2012 at 11:44:35AM +0200, Gleb Natapov wrote:
> Add test for aad instruction emulation.
> 
> Signed-off-by: Gleb Natapov <gleb@redhat.com>

Applied, thanks.

--
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 mbox

Patch

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);
 }