diff options
author | iximeow <me@iximeow.net> | 2019-01-05 15:26:46 -0800 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2020-01-12 16:10:13 -0800 |
commit | d8efc7b6fca3e1c6a9ebf0ada6759a927c12558f (patch) | |
tree | bcb09ad2413fdb2620492d31dd26c04c41a80af7 /test | |
parent | a2fdcc2106024e7e9b1b119c9de50242706c9424 (diff) |
add more test cases, fix movzx support, add 0xf6 opcodes
Diffstat (limited to 'test')
-rw-r--r-- | test/test.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/test.rs b/test/test.rs index c4133e6..83f24f9 100644 --- a/test/test.rs +++ b/test/test.rs @@ -22,7 +22,7 @@ fn test_mov() { &[0x48, 0x89, 0x43, 0x18] ).unwrap()), "mov [rbx + 0x18], rax"); assert_eq!(&format!("{}", decode( - &[0x48, 0xc7, 0x43, 0x10, 0x00, 0x00, 0x00] + &[0x48, 0xc7, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00] ).unwrap()), "mov [rbx + 0x10], 0x0"); assert_eq!(&format!("{}", decode( &[0x49, 0x89, 0x4e, 0x08] @@ -35,10 +35,13 @@ fn test_mov() { ).unwrap()), "mov [r14 + 0x10], rax"); assert_eq!(&format!("{}", decode( &[0x4d, 0x0f, 0x43, 0xec, 0x49] - ).unwrap()), "cmovae r13, r12"); + ).unwrap()), "cmovnb r13, r12"); assert_eq!(&format!("{}", decode( &[0x0f, 0xb6, 0x06] ).unwrap()), "movzx eax, byte [rsi]"); + assert_eq!(&format!("{}", decode( + &[0x0f, 0xb7, 0x06] + ).unwrap()), "movzx eax, word [rsi]"); } #[test] |