From 2f9867664191bcfe0b7f7209de7463df30f775de Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 30 Jun 2019 12:56:08 -0700 Subject: add more x86 instructions (bt, btr, bts, bsf, ...) and xadd --- test/test.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') diff --git a/test/test.rs b/test/test.rs index 3a7aee9..5d5f3b0 100644 --- a/test/test.rs +++ b/test/test.rs @@ -98,6 +98,7 @@ fn test_mov() { test_display(&[0x0f, 0xb7, 0x06], "movzx eax, word [rsi]"); test_display(&[0x89, 0x55, 0x94], "mov [rbp - 0x6c], edx"); test_display(&[0x65, 0x4c, 0x89, 0x04, 0x25, 0xa8, 0x01, 0x00, 0x00], "mov gs:[0x1a8], r8"); + test_display(&[0x0f, 0xbe, 0x83, 0xb4, 0x00, 0x00, 0x00], "movsx eax, byte [rbx + 0xb4]"); test_display(&[0x48, 0x63, 0x04, 0xba], "movsxd rax, [rdx + rdi * 4]"); } @@ -146,7 +147,14 @@ fn test_push_pop() { } #[test] +fn test_bitwise() { + test_display(&[0x41, 0x0f, 0xbc, 0xd3], "bsf edx, r11d"); + test_display(&[0x48, 0x0f, 0xa3, 0xd0], "bt rax, rdx"); +} + +#[test] fn test_misc() { + test_display(&[0x9c], "pushf"); test_display(&[0x48, 0x98], "cdqe"); test_display(&[0x66, 0x2e, 0x0f, 0x1f, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00], "nop cs:[rax + rax]"); test_display(&[0x66, 0x0f, 0x1f, 0x44, 0x00, 0x00], "nop cs:[rax + rax]"); -- cgit v1.1