From e9b3973cbf689eac2ea11c2dacf6f2d8c2ce01c5 Mon Sep 17 00:00:00 2001 From: iximeow Date: Tue, 19 May 2026 05:36:55 +0000 Subject: invept precision --- test/long_mode/mod.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/long_mode') diff --git a/test/long_mode/mod.rs b/test/long_mode/mod.rs index f53170b..649d979 100644 --- a/test/long_mode/mod.rs +++ b/test/long_mode/mod.rs @@ -2986,6 +2986,12 @@ fn test_sha() { #[test] fn test_vmx() { + fn test_display_vmx(bytes: &[u8], text: &'static str) { + test_display_under(&InstDecoder::minimal().with_vmx(), bytes, text); + test_display_under(&InstDecoder::default(), bytes, text); + test_invalid_under(&InstDecoder::minimal(), bytes); + } + test_display(&[0x0f, 0xc7, 0x3f], "vmptrst qword [rdi]"); test_display(&[0x0f, 0xc7, 0x37], "vmptrld qword [rdi]"); test_display(&[0xf3, 0x0f, 0xc7, 0x37], "vmxon qword [rdi]"); @@ -2998,6 +3004,10 @@ fn test_vmx() { test_display(&[0x66, 0x0f, 0xc7, 0x33], "vmclear qword [rbx]"); test_display(&[0xf3, 0x4f, 0x0f, 0xc7, 0x33], "vmxon qword [r11]"); test_display(&[0xf3, 0x0f, 0xc7, 0x33], "vmxon qword [rbx]"); + + // these need vmx and invept features + test_display_vmx(&[0x66, 0x0f, 0x38, 0x80, 0x01], "invept rax, xmmword [rcx]"); + test_display_vmx(&[0x66, 0x0f, 0x38, 0x81, 0x01], "invvpid rax, xmmword [rcx]"); } #[test] -- cgit v1.1