From a493b4d267c4fb6a042cf071301c8885196b4a91 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 21 Mar 2021 01:02:00 -0700 Subject: rewrite 0f-based instruction handling this is... a more significant rewrite than i expected yaxpeax-x86 to ever need. it turns out that capstone is extremely permissive about duplicative 66/f2/f3 prefixes to the point that the implemented prefex handling was unsalvageable. while this replaces the *0f* opcode tables, i haven't profiled these changes. it's possible this is a net improvement for single-byte opcodes, it could be a net loss. code size may be severely impacted. there is still work to do. but this in total gets very close to iced/xed/zydis parity, far more than before. also adds several small extensions, gfni, 3dnow, enqcmd, invpcid, some of cet, and a few missing avx instructions. --- test/long_mode/display.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/long_mode/display.rs') diff --git a/test/long_mode/display.rs b/test/long_mode/display.rs index 988e360..7017270 100644 --- a/test/long_mode/display.rs +++ b/test/long_mode/display.rs @@ -152,7 +152,8 @@ fn test_instructions_c() { test_display(&[0x3a, 0xc0], "rflags = flags(al - al)"); test_display(&[0x3b, 0xc0], "rflags = flags(eax - eax)"); - test_display(&[0x41, 0x0f, 0xbc, 0xd3], "edx = lsb(r11d)"); + test_display(&[0x41, 0x0f, 0xbc, 0xd3], "edx = lsb(r11d) (x86 bsf)"); + test_display(&[0xf3, 0x41, 0x0f, 0xbc, 0xd3], "edx = lsb(r11d)"); // test_display(&[0x41, 0x0f, 0xbc, 0xd3], "edx = lsb(r11d) (x86 bsf"); // for non-bm1 test_display(&[0x41, 0x0f, 0xbd, 0xd3], "edx = msb(r11d)"); // test_display(&[0x41, 0x0f, 0xbc, 0xd3], "edx = lsb(r11d) (x86 bsr"); // for non-bm1 -- cgit v1.1