Skip to content

Commit

Permalink
StrhImmediateThumbT1: Fix imm32 decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
matan1008 committed Aug 8, 2023
1 parent f6c54bb commit 286b92a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ def from_bitarray(instr, processor):
index = True
add = True
wback = False
imm32 = imm5 << 2
imm32 = imm5 << 1
return StrhImmediateThumbT1(instr, add=add, wback=wback, index=index, t=rt, n=rn, imm32=imm32)
2 changes: 1 addition & 1 deletion tests/armv6_tests/opcode_tests/test_strh.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def test_strh_register_t1(thumb_v6_without_fetch):

def test_strh_immediate_thumb_t1(thumb_v6_without_fetch):
arm = thumb_v6_without_fetch
arm.opcode = 0b1000000001001010
arm.opcode = 0b1000000010001010
arm.opcode_len = 16
# setting Data Region registers
arm.registers.drsrs[0].en = 1 # enabling memory region
Expand Down

0 comments on commit 286b92a

Please sign in to comment.