Skip to content

Commit

Permalink
Fix handling of var_ssa_dest_and_src and reg_stack_ssa_dest_and_src
Browse files Browse the repository at this point in the history
  • Loading branch information
xusheng6 authored and withzombies committed Jun 7, 2021
1 parent c0b8fe6 commit 3d03b7f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,12 @@ def graph_il_insn(g, head, il, label=None):
# [<ssa <var struct B b> version 1>, <ssa <var struct B b> version 0>, 0, <il: 0x61>]
if ty == 'reg_stack_ssa_dest_and_src' or ty == 'var_ssa_dest_and_src':
# handle the ssa_dest_and_src operand types
# This consumes two elements in ops, and only increase op_index once
next_label = 'next' if edge_label == 'prev' else 'dest'
graph_il_insn(g, record, o, next_label)
# This will consume an element in ops, without increacing op_index
_, o2 = next(ops)
graph_il_insn(g, record, o2, edge_label)
op_index += 1
else:
# handle everything else
graph_il_insn(g, record, o, edge_label)
Expand Down

0 comments on commit 3d03b7f

Please sign in to comment.