From 47a1d9d6fd48229961edf76b789328dc99a19c6c Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 6 Dec 2020 13:50:27 -0800 Subject: fix an off by one in non-temporal hint selection thank you @The6P4C for finding and reporting! --- tests/test.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') diff --git a/tests/test.rs b/tests/test.rs index 8f6feb0..114d81d 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -32,6 +32,11 @@ fn test_invalid_instruction() { let data = [0xe3, 0x80, 0x00, 0x00, 0x00, 0x61, 0xe2, 0x00, 0x00, 0x00, 0x42, 0xc0, 0xe1, 0x80, 0x30, 0x00]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); + + let expected = "[MII] purple.nt3; break.i 0x0; break.i 0x0"; + let data = [0x00, 0x00, 0x00, 0x00, 0x0E, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); } #[test] fn test_shr_shl_dep_ext() { -- cgit v1.1