aboutsummaryrefslogtreecommitdiff
path: root/test/test.rs
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2019-06-30 12:56:08 -0700
committeriximeow <me@iximeow.net>2020-01-12 16:10:13 -0800
commit2f9867664191bcfe0b7f7209de7463df30f775de (patch)
tree6f8e5f2265b201ece2712c1db321b09a4db2511d /test/test.rs
parent49d2e670b56d43d079775f01a02f31555bb9da73 (diff)
add more x86 instructions (bt, btr, bts, bsf, ...) and xadd
Diffstat (limited to 'test/test.rs')
-rw-r--r--test/test.rs8
1 files changed, 8 insertions, 0 deletions
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]");