aboutsummaryrefslogtreecommitdiff
path: root/tests/armv7/thumb.rs
diff options
context:
space:
mode:
authorMitchell Johnson <ehntoo@ehntoo.org>2022-09-04 19:16:21 -0400
committeriximeow <git@iximeow.net>2022-09-29 15:50:31 -0700
commit4470c5b393817a93854472354d76911cfc9abe6f (patch)
treef45100c3cf1ccaf0baa450ab3a2dc154a6e8cc3a /tests/armv7/thumb.rs
parent189cbcfdad097363e66f41daf4d6a76acbf3661c (diff)
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.
Diffstat (limited to 'tests/armv7/thumb.rs')
-rw-r--r--tests/armv7/thumb.rs4
1 files changed, 4 insertions, 0 deletions
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"
);