summaryrefslogtreecommitdiff
path: root/tests/test.rs
diff options
context:
space:
mode:
authorDan Ravensloft <dan.ravensloft@gmail.com>2020-12-07 14:25:44 +0000
committeriximeow <me@iximeow.net>2020-12-07 09:27:35 -0800
commit1e0bc1333028a9556faf3d6734c140c6fd76d113 (patch)
tree0716a26dbfec492c316b955819c38894ef65cbcc /tests/test.rs
parent14a32a5600d6ec03a578e031bd3af743b49b56e4 (diff)
Transpose Table 4-43 to fix decoding of srlz.i
Diffstat (limited to 'tests/test.rs')
-rw-r--r--tests/test.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test.rs b/tests/test.rs
index 01df3fb..a21cfcc 100644
--- a/tests/test.rs
+++ b/tests/test.rs
@@ -46,6 +46,11 @@ fn test_ad_hoc() {
let data = [0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x20, 0x00, 0x00, 0x60, 0x00, 0x40, 0x00, 0x14, 0x00, 0x90];
let inst = decoder.decode(data[..].iter().cloned()).unwrap();
assert_eq!(format!("{}", inst), expected);
+
+ let expected = "[MMI] srlz.i;; mov r9=0x1; nop.i 0x0;;";
+ let data = [0x0b, 0x00, 0x00, 0x00, 0x31, 0x00, 0x90, 0x08, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x04, 0x00];
+ let inst = decoder.decode(data[..].iter().cloned()).unwrap();
+ assert_eq!(format!("{}", inst), expected);
}
#[test]
fn test_shr_shl_dep_ext() {