From 1e0bc1333028a9556faf3d6734c140c6fd76d113 Mon Sep 17 00:00:00 2001 From: Dan Ravensloft Date: Mon, 7 Dec 2020 14:25:44 +0000 Subject: Transpose Table 4-43 to fix decoding of srlz.i --- tests/test.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/test.rs') 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() { -- cgit v1.1