diff options
author | iximeow <me@iximeow.net> | 2020-12-05 16:42:17 -0800 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2020-12-06 11:58:57 -0800 |
commit | e30fee133cd0296bf3d0211e5ce13b5dfba03561 (patch) | |
tree | f7b966083f48d22b9969bab9ff7f4cdf1c71c8cd /test/armv7.rs | |
parent | 72f9a2500b2f2b65e61a5d19b3606225084c896d (diff) |
fix some 32-bit thumb2 instructions, hook up .w, `s`, and a few typos
mostly confusion of pre/post-increment, operand widths, immediate
widths, things of that nature
Diffstat (limited to 'test/armv7.rs')
-rw-r--r-- | test/armv7.rs | 57 |
1 files changed, 38 insertions, 19 deletions
diff --git a/test/armv7.rs b/test/armv7.rs index 09a57e2..c2f3300 100644 --- a/test/armv7.rs +++ b/test/armv7.rs @@ -108,7 +108,8 @@ fn test_decode_str_ldr() { Operand::Nothing, Operand::Nothing, ], - s: false + s: false, + thumb_w: false, } ); test_decode( @@ -122,7 +123,8 @@ fn test_decode_str_ldr() { Operand::Nothing, Operand::Nothing, ], - s: false + s: false, + thumb_w: false, } ); test_decode( @@ -136,7 +138,8 @@ fn test_decode_str_ldr() { Operand::Nothing, Operand::Nothing, ], - s: false + s: false, + thumb_w: false, } ); test_decode( @@ -150,7 +153,8 @@ fn test_decode_str_ldr() { Operand::Nothing, Operand::Nothing, ], - s: false + s: false, + thumb_w: false, } ); test_decode( @@ -164,7 +168,8 @@ fn test_decode_str_ldr() { Operand::Nothing, Operand::Nothing, ], - s: false + s: false, + thumb_w: false, } ); test_decode( @@ -178,7 +183,8 @@ fn test_decode_str_ldr() { Operand::Nothing, Operand::Nothing, ], - s: false + s: false, + thumb_w: false, } ); test_all([0x10, 0x00, 0x7f, 0xe5], "ldrb r0, [pc, -0x10]!"); @@ -342,7 +348,8 @@ fn test_decode_pop() { Operand::Nothing, Operand::Nothing, ], - s: false + s: false, + thumb_w: false, } ); test_display( @@ -360,7 +367,8 @@ fn test_decode_pop() { Operand::Nothing, Operand::Nothing, ], - s: false + s: false, + thumb_w: false, } ); test_display( @@ -378,7 +386,8 @@ fn test_decode_pop() { Operand::Nothing, Operand::Nothing, ], - s: false + s: false, + thumb_w: false, } ); test_display( @@ -400,7 +409,8 @@ fn test_decode_mov() { Operand::Nothing, Operand::Nothing, ], - s: false + s: false, + thumb_w: false, } ); test_display([0x0d, 0x20, 0xa0, 0xe1], "mov r2, sp"); @@ -416,7 +426,8 @@ fn test_decode_mov() { Operand::Nothing, Operand::Nothing, ], - s: false + s: false, + thumb_w: false, } ); } @@ -429,7 +440,8 @@ fn test_decode_arithmetic() { condition: ConditionCode::EQ, opcode: Opcode::AND, operands: [Operand::Reg(Reg::from_u8(1)), Operand::Reg(Reg::from_u8(0)), Operand::RegShift(RegShift::from_raw(0xd18)), Operand::Nothing], - s: false + s: false, + thumb_w: false, } ); test_display( @@ -442,7 +454,8 @@ fn test_decode_arithmetic() { condition: ConditionCode::AL, opcode: Opcode::ADD, operands: [Operand::Reg(Reg::from_u8(3)), Operand::Reg(Reg::from_u8(15)), Operand::Reg(Reg::from_u8(3)), Operand::Nothing], - s: false + s: false, + thumb_w: false, } ); test_decode( @@ -451,7 +464,8 @@ fn test_decode_arithmetic() { condition: ConditionCode::AL, opcode: Opcode::RSB, operands: [Operand::Reg(Reg::from_u8(3)), Operand::Reg(Reg::from_u8(6)), Operand::Reg(Reg::from_u8(3)), Operand::Nothing], - s: false + s: false, + thumb_w: false, } ); test_decode( @@ -460,7 +474,8 @@ fn test_decode_arithmetic() { condition: ConditionCode::AL, opcode: Opcode::MOV, operands: [Operand::Reg(Reg::from_u8(3)), Operand::Reg(Reg::from_u8(0)), Operand::RegShift(RegShift::from_raw(0x143)), Operand::Nothing], - s: false + s: false, + thumb_w: false, } ); test_decode( @@ -469,7 +484,8 @@ fn test_decode_arithmetic() { condition: ConditionCode::AL, opcode: Opcode::SUB, operands: [Operand::Reg(Reg::from_u8(5)), Operand::Reg(Reg::from_u8(3)), Operand::Imm32(1), Operand::Nothing], - s: false + s: false, + thumb_w: false, } ); } @@ -535,7 +551,8 @@ fn test_decode_mul() { Operand::Reg(Reg::from_u8(13)), Operand::Nothing, ], - s: false + s: false, + thumb_w: false, } ); test_decode( @@ -549,7 +566,8 @@ fn test_decode_mul() { Operand::Reg(Reg::from_u8(9)), Operand::Nothing, ], - s: false + s: false, + thumb_w: false, } ); test_decode( @@ -563,7 +581,8 @@ fn test_decode_mul() { Operand::Reg(Reg::from_u8(9)), Operand::Nothing, ], - s: false + s: false, + thumb_w: false, } ); } |