diff options
author | iximeow <me@iximeow.net> | 2019-03-30 15:27:43 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2020-01-12 16:10:13 -0800 |
commit | 11524fe292cfd4f40d9c7127c0e82ff1ef3e9793 (patch) | |
tree | fa993663fe8096a16171bde8aa03cc716d19b81b /test/test.rs | |
parent | 9ca5adc847098d6f74f49707b94ed0df23626c18 (diff) |
starting to get into some system instructions now
Diffstat (limited to 'test/test.rs')
-rw-r--r-- | test/test.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/test.rs b/test/test.rs index df94aeb..1e73a2e 100644 --- a/test/test.rs +++ b/test/test.rs @@ -38,6 +38,23 @@ fn test_display(data: &[u8], expected: &'static str) { } #[test] +fn test_system() { + test_display(&[0x45, 0x0f, 0x22, 0xc8], "mov cr9, r8"); + test_display(&[0x45, 0x0f, 0x20, 0xc8], "mov r8, cr9"); + test_display(&[0x40, 0x0f, 0x22, 0xc8], "mov cr1, rax"); + test_display(&[0x0f, 0x22, 0xc8], "mov cr1, rax"); + test_display(&[0x44, 0x0f, 0x22, 0xcf], "mov cr9, rdi"); + test_display(&[0x0f, 0x22, 0xcf], "mov cr1, rdi"); + test_display(&[0x0f, 0x20, 0xc8], "mov rax, cr1"); + + test_display(&[0x45, 0x0f, 0x23, 0xc8], "mov dr9, r8"); + test_display(&[0x45, 0x0f, 0x21, 0xc8], "mov r8, dr9"); + test_display(&[0x40, 0x0f, 0x23, 0xc8], "mov dr1, rax"); + test_display(&[0x0f, 0x23, 0xc8], "mov dr1, rax"); + test_display(&[0x0f, 0x21, 0xc8], "mov rax, dr1"); +} + +#[test] fn test_arithmetic() { test_display(&[0x81, 0xec, 0x10, 0x03, 0x00, 0x00], "sub esp, 0x310"); } |