Skip to content

Commit

Permalink
Fix aarch64 tbz, tbnz, cbz and cbnz instructions estimation
Browse files Browse the repository at this point in the history
  • Loading branch information
borismol committed Jun 5, 2021
1 parent 4ae9dbb commit c032bf6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gef.py
Original file line number Diff line number Diff line change
Expand Up @@ -1928,7 +1928,7 @@ def is_branch_taken(self, insn):
taken, reason = False, ""

if mnemo in {"cbnz", "cbz", "tbnz", "tbz"}:
reg = operands[0]
reg = "${}".format(operands[0])
op = get_register(reg)
if mnemo == "cbnz":
if op!=0: taken, reason = True, "{}!=0".format(reg)
Expand Down

0 comments on commit c032bf6

Please sign in to comment.