From 8b9d5f9c6003864870dccfe2c0f71729d4b99564 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 4 Aug 2019 19:12:25 -0700 Subject: fix issue with incorrectly decoding register shifts --- test/armv7.rs | 15 +++++++++++++++ test/test.rs | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/armv7.rs b/test/armv7.rs index c76cb4a..af5336c 100644 --- a/test/armv7.rs +++ b/test/armv7.rs @@ -163,6 +163,21 @@ fn test_decode_mov() { #[test] fn test_decode_arithmetic() { test_decode( + [0x18, 0x1d, 0x00, 0x00], + Instruction { + condition: ConditionCode::EQ, + opcode: Opcode::AND, + operands: Operands::ThreeOperandWithShift( + 1, 0, 8, ShiftSpec::Register(104) + ), + s: false + } + ); + test_display( + [0x18, 0x1d, 0x00, 0x00], + "andeq r1, r0, r8, lsl sp", + ); + test_decode( [0x03, 0x30, 0x8f, 0xe0], Instruction { condition: ConditionCode::AL, diff --git a/test/test.rs b/test/test.rs index 7dd54ea..72b7e50 100644 --- a/test/test.rs +++ b/test/test.rs @@ -5,5 +5,5 @@ extern crate test; extern crate yaxpeax_arch; extern crate yaxpeax_arm; -// mod armv7; +mod armv7; mod armv8; -- cgit v1.1 From 120adb21db26779729c026b576739b1de82bc198 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 4 Aug 2019 19:12:54 -0700 Subject: decode blx --- test/armv7.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test') diff --git a/test/armv7.rs b/test/armv7.rs index af5336c..f7ab079 100644 --- a/test/armv7.rs +++ b/test/armv7.rs @@ -86,6 +86,10 @@ fn test_decode_str_ldr() { #[test] fn test_decode_misc() { test_display( + [0x32, 0xff, 0x2f, 0xe1], + "blx r2" + ); + test_display( [0x02, 0x00, 0xa0, 0xe3], "mov r0, 0x2" ); -- cgit v1.1 From 77bc926bb3b0840bc91dd0774d01e8ca25c80616 Mon Sep 17 00:00:00 2001 From: iximeow Date: Tue, 6 Aug 2019 20:51:42 -0700 Subject: armv7 test cases --- test/armv7.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/armv7.rs b/test/armv7.rs index f7ab079..09f5333 100644 --- a/test/armv7.rs +++ b/test/armv7.rs @@ -330,7 +330,7 @@ fn test_decode_span() { instr); i += instr.len(); } - panic!("done"); +// panic!("done"); } /* * from debian 5.0.10 bash 3.2-4_arm -- cgit v1.1