From 4470c5b393817a93854472354d76911cfc9abe6f Mon Sep 17 00:00:00 2001 From: Mitchell Johnson Date: Sun, 4 Sep 2022 19:16:21 -0400 Subject: Fix negative unconditional 16-bit thumb branches Sign extension shift had an off-by-one error so the sign bit was not being properly extended. --- tests/armv7/thumb.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/armv7') diff --git a/tests/armv7/thumb.rs b/tests/armv7/thumb.rs index be5434f..dc912a6 100644 --- a/tests/armv7/thumb.rs +++ b/tests/armv7/thumb.rs @@ -490,6 +490,10 @@ fn test_decode_adr_cases() { #[test] fn test_decode_bcc_cases() { test_display( + &[0xfe, 0xe7], + "b $-0x4" + ); + test_display( &[0x80, 0x47], "blx r0" ); -- cgit v1.1