diff mbox

[unit,test] add test for "mov[zs]x %ah, ..." instruction

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

Commit Message

Gleb Natapov April 24, 2013, 10:50 a.m. UTC
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 April 30, 2013, 2:23 a.m. UTC | #1
On Wed, Apr 24, 2013 at 01:50:40PM +0300, Gleb Natapov wrote:
> 
> Signed-off-by: Gleb Natapov <gleb@redhat.com>
> diff --git a/x86/realmode.c b/x86/realmode.c

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