summaryrefslogtreecommitdiff
path: root/tests/test.rs
diff options
context:
space:
mode:
authorThe6P4C <watsonjcampbell@gmail.com>2020-12-15 13:12:00 +0000
committeriximeow <me@iximeow.net>2020-12-15 23:46:10 -0800
commitde023b78c710d381ee50a04bb7bf60515a1fded0 (patch)
tree9804765e66347977e2e3994904c88ff07879658a /tests/test.rs
parent2c5c5cda6c39f5b7d29063731b89771ee3be30ae (diff)
Fix decoding of mov-to-PKR0.1.3
Table 4-45 had a transcription error with an M43 in place of the correct M43 for mov-to-pkr's operand form
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 2c4e855..405e516 100644
--- a/tests/test.rs
+++ b/tests/test.rs
@@ -51,6 +51,11 @@ fn test_ad_hoc() {
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);
+
+ let expected = "[MMI] mov pkr[r0]=r0;; mov rr[r0]=r5; mov r1=r0;;";
+ let data = [0x0b, 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x28, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0x00, 0x84];
+ let inst = decoder.decode(data[..].iter().cloned()).unwrap();
+ assert_eq!(format!("{}", inst), expected);
}
#[test]
fn test_shr_shl_dep_ext() {