From 3975ace417ccd0a8381b93e91e3c8b4be9640636 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sat, 3 Jul 2021 16:45:53 -0700 Subject: more carefully test mmx operand sizes --- test/protected_mode/mod.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'test/protected_mode') diff --git a/test/protected_mode/mod.rs b/test/protected_mode/mod.rs index 04a5676..c9afc0b 100644 --- a/test/protected_mode/mod.rs +++ b/test/protected_mode/mod.rs @@ -156,8 +156,23 @@ fn test_mmx() { test_display(&[0x0f, 0xfa, 0xc2], "psubd mm0, mm2"); test_display(&[0x0f, 0xfb, 0xc2], "psubq mm0, mm2"); test_display(&[0x0f, 0xfc, 0xc2], "paddb mm0, mm2"); + test_display(&[0x0f, 0xfc, 0x02], "paddb mm0, qword [edx]"); test_display(&[0x0f, 0xfd, 0xc2], "paddw mm0, mm2"); test_display(&[0x0f, 0xfe, 0xc2], "paddd mm0, mm2"); + + test_display(&[0x0f, 0xf1, 0x02], "psllw mm0, qword [edx]"); + test_display(&[0x0f, 0xf2, 0x02], "pslld mm0, qword [edx]"); + test_display(&[0x0f, 0xf3, 0x02], "psllq mm0, qword [edx]"); + test_display(&[0x0f, 0xf4, 0x02], "pmuludq mm0, qword [edx]"); + test_display(&[0x0f, 0xf5, 0x02], "pmaddwd mm0, qword [edx]"); + test_display(&[0x0f, 0xf6, 0x02], "psadbw mm0, qword [edx]"); + test_display(&[0x0f, 0xf8, 0x02], "psubb mm0, qword [edx]"); + test_display(&[0x0f, 0xf9, 0x02], "psubw mm0, qword [edx]"); + test_display(&[0x0f, 0xfa, 0x02], "psubd mm0, qword [edx]"); + test_display(&[0x0f, 0xfb, 0x02], "psubq mm0, qword [edx]"); + test_display(&[0x0f, 0xfc, 0x02], "paddb mm0, qword [edx]"); + test_display(&[0x0f, 0xfd, 0x02], "paddw mm0, qword [edx]"); + test_display(&[0x0f, 0xfe, 0x02], "paddd mm0, qword [edx]"); } #[test] @@ -2864,6 +2879,11 @@ fn test_x87() { #[test] fn test_mishegos_finds() { + test_display(&[0x0f, 0xfc, 0xaf, 0x40, 0x38, 0x25, 0xbf], "paddb mm5, qword [edi - 0x40dac7c0]"); + test_invalid(&[0xf3, 0x67, 0x0f, 0x3a, 0xf0, 0xfb, 0xb4]); + test_display(&[0x65, 0x66, 0x0f, 0x01, 0xdc], "stgi"); + test_display(&[0x66, 0x0f, 0x01, 0xd8], "vmrun eax"); + test_invalid(&[0x2e, 0x2e, 0xf2, 0x36, 0x0f, 0xb2, 0xdb, 0x42, 0xd6, 0xa3, 0x16]); test_display(&[0x65, 0x67, 0x65, 0x65, 0x0f, 0x0e], "femms"); test_display(&[0x26, 0x66, 0x67, 0x0f, 0x38, 0xdf, 0xe4], "aesdeclast xmm4, xmm4"); test_display(&[0x65, 0x66, 0x66, 0x64, 0x0f, 0x38, 0xdb, 0x0f], "aesimc xmm1, xmmword fs:[edi]"); -- cgit v1.1