From c5b4cd30efa6cc830f5effaf04df6ec86ad858dd Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 26 Jul 2020 01:40:46 -0700 Subject: support upper end of 0f opcode map mmx instructions --- test/long_mode/mod.rs | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'test') diff --git a/test/long_mode/mod.rs b/test/long_mode/mod.rs index 97f0bd5..50774ff 100644 --- a/test/long_mode/mod.rs +++ b/test/long_mode/mod.rs @@ -125,6 +125,47 @@ fn test_mmx() { test_invalid(&[0x4f, 0x0f, 0xd7, 0x00]); test_display(&[0x4f, 0x0f, 0xd7, 0xcf], "pmovmskb r9d, mm7"); test_display(&[0x0f, 0x3a, 0x0f, 0xc1, 0x23], "palignr mm0, mm1, 0x23"); + test_display(&[0x0f, 0xf9, 0xc2], "psubw mm0, mm2"); + test_display(&[0x0f, 0xfd, 0xd2], "paddw mm2, mm2"); + test_display(&[0x0f, 0x6f, 0xe9], "movq mm5, mm1"); + test_display(&[0x0f, 0xe5, 0x3d, 0xaa, 0xbb, 0xcc, 0x77], "pmulhw mm7, [rip + 0x77ccbbaa]"); + + test_display(&[0x0f, 0x74, 0xc2], "pcmpeqb mm0, mm2"); + test_display(&[0x0f, 0x75, 0xc2], "pcmpeqw mm0, mm2"); + test_display(&[0x0f, 0x76, 0xc2], "pcmpeqd mm0, mm2"); + + test_display(&[0x0f, 0xd8, 0xc2], "psubusb mm0, mm2"); + test_display(&[0x0f, 0xd9, 0xc2], "psubusw mm0, mm2"); + test_display(&[0x0f, 0xda, 0xc2], "pminub mm0, mm2"); + test_display(&[0x0f, 0xdb, 0xc2], "pand mm0, mm2"); + test_display(&[0x0f, 0xdc, 0xc2], "paddusb mm0, mm2"); + test_display(&[0x0f, 0xdd, 0xc2], "paddusw mm0, mm2"); + test_display(&[0x0f, 0xde, 0xc2], "pmaxub mm0, mm2"); + test_display(&[0x0f, 0xdf, 0xc2], "pandn mm0, mm2"); + + test_display(&[0x0f, 0xe8, 0xc2], "psubsb mm0, mm2"); + test_display(&[0x0f, 0xe9, 0xc2], "psubsw mm0, mm2"); + test_display(&[0x0f, 0xea, 0xc2], "pminsw mm0, mm2"); + test_display(&[0x0f, 0xeb, 0xc2], "por mm0, mm2"); + test_display(&[0x0f, 0xec, 0xc2], "paddsb mm0, mm2"); + test_display(&[0x0f, 0xed, 0xc2], "paddsw mm0, mm2"); + test_display(&[0x0f, 0xee, 0xc2], "pmaxsw mm0, mm2"); + test_display(&[0x0f, 0xef, 0xc2], "pxor mm0, mm2"); + + test_invalid(&[0x0f, 0xf0, 0xc2]); + test_display(&[0x0f, 0xf1, 0xc2], "psllw mm0, mm2"); + test_display(&[0x0f, 0xf2, 0xc2], "pslld mm0, mm2"); + test_display(&[0x0f, 0xf3, 0xc2], "psllq mm0, mm2"); + test_display(&[0x0f, 0xf4, 0xc2], "pmuludq mm0, mm2"); + test_display(&[0x0f, 0xf5, 0xc2], "pmaddwd mm0, mm2"); + test_display(&[0x0f, 0xf6, 0xc2], "psadbw mm0, mm2"); + test_display(&[0x0f, 0xf8, 0xc2], "psubb mm0, mm2"); + test_display(&[0x0f, 0xf9, 0xc2], "psubw mm0, mm2"); + 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, 0xfd, 0xc2], "paddw mm0, mm2"); + test_display(&[0x0f, 0xfe, 0xc2], "paddd mm0, mm2"); } #[test] -- cgit v1.1