Skip to content

Commit fe7bb2d

Browse files
waskyosipma
authored andcommitted
some fixes for ARMStoreRegisterHalfword
- If hitting the right path, lhs was potentially unbound. This makes it None in that path and we check for it - The ll_assigns and hl_assigns variable were showing up as unused. I switched things over to use them as the return value
1 parent 2a628a7 commit fe7bb2d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

chb/arm/opcodes/ARMStoreRegisterHalfword.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ def ast_prov(
194194
lhs, xdata, iaddr, astree, memaddr=memaddr)
195195

196196
elif xd.is_vmem_unknown and xd.is_address_known:
197+
lhs = None
197198
memaddr = xd.xaddr
198199
hl_lhs = XU.xmemory_dereference_lval(memaddr, xdata, iaddr, astree)
199200

@@ -216,7 +217,7 @@ def ast_prov(
216217
bytestring=bytestring,
217218
annotations=annotations)
218219

219-
if lhs.is_tmp:
220+
if lhs is not None and lhs.is_tmp:
220221
astree.add_expose_instruction(hl_assign.instrid)
221222
astree.add_instr_mapping(hl_assign, ll_assign)
222223
astree.add_instr_address(hl_assign, [iaddr])
@@ -265,4 +266,4 @@ def ast_prov(
265266
ll_assigns = [ll_assign]
266267
hl_assigns = [hl_assign]
267268

268-
return ([hl_assign], [ll_assign])
269+
return (hl_assigns, ll_assigns)

0 commit comments

Comments
 (0)