From 6c32405ca9930f393d8ca45d22df1b5a1c7c8653 Mon Sep 17 00:00:00 2001 From: iximeow Date: Fri, 27 Mar 2026 07:05:18 +0000 Subject: more accurate mov seg-to-gpr operand size --- test/protected_mode/mod.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/protected_mode/mod.rs') diff --git a/test/protected_mode/mod.rs b/test/protected_mode/mod.rs index 29e9ec4..78a061a 100644 --- a/test/protected_mode/mod.rs +++ b/test/protected_mode/mod.rs @@ -1075,12 +1075,22 @@ fn test_mov() { test_display(&[0x0f, 0x97, 0x08], "seta byte [eax]"); // test_display(&[0xd6], "salc"); test_display(&[0x8e, 0x00], "mov es, word [eax]"); + test_display(&[0x8e, 0xc0], "mov es, ax"); + test_display(&[0x8c, 0xc0], "mov eax, es"); // cs is not an allowed destination test_invalid(&[0x8e, 0x08]); test_display(&[0x8e, 0x10], "mov ss, word [eax]"); + test_display(&[0x8e, 0xd0], "mov ss, ax"); + test_display(&[0x8c, 0xd0], "mov eax, ss"); test_display(&[0x8e, 0x18], "mov ds, word [eax]"); + test_display(&[0x8e, 0xd8], "mov ds, ax"); + test_display(&[0x8c, 0xd8], "mov eax, ds"); test_display(&[0x8e, 0x20], "mov fs, word [eax]"); + test_display(&[0x8e, 0xe0], "mov fs, ax"); + test_display(&[0x8c, 0xe0], "mov eax, fs"); test_display(&[0x8e, 0x28], "mov gs, word [eax]"); + test_display(&[0x8e, 0xe8], "mov gs, ax"); + test_display(&[0x8c, 0xe8], "mov eax, gs"); test_invalid(&[0x8e, 0x30]); test_invalid(&[0x8e, 0x38]); } -- cgit v1.1