From 72f9a2500b2f2b65e61a5d19b3606225084c896d Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 29 Nov 2020 20:40:45 -0800 Subject: add thumb/thumb2 decoding 16-bit instructions only, for now --- test/armv7.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'test/armv7.rs') diff --git a/test/armv7.rs b/test/armv7.rs index 865aeb5..09a57e2 100644 --- a/test/armv7.rs +++ b/test/armv7.rs @@ -1,6 +1,8 @@ use yaxpeax_arch::{Arch, Decoder, LengthedInstruction}; use yaxpeax_arm::armv7::{ARMv7, Instruction, ConditionCode, DecodeError, Operand, Opcode, Reg, RegShift}; +mod thumb; + type InstDecoder = ::Decoder; fn test_invalid_under(decoder: &InstDecoder, data: [u8; 4]) { @@ -351,9 +353,9 @@ fn test_decode_pop() { [0xf0, 0x40, 0x2d, 0xe9], Instruction { condition: ConditionCode::AL, - opcode: Opcode::STM(false, true, true, false), + opcode: Opcode::STM(false, true, false, false), operands: [ - Operand::Reg(Reg::from_u8(13)), + Operand::RegWBack(Reg::from_u8(13), true), Operand::RegList(16624), Operand::Nothing, Operand::Nothing, @@ -369,9 +371,9 @@ fn test_decode_pop() { [0xf0, 0x80, 0xbd, 0x18], Instruction { condition: ConditionCode::NE, - opcode: Opcode::LDM(true, false, true, false), + opcode: Opcode::LDM(true, false, false, false), operands: [ - Operand::Reg(Reg::from_u8(13)), + Operand::RegWBack(Reg::from_u8(13), true), Operand::RegList(33008), Operand::Nothing, Operand::Nothing, -- cgit v1.1