Skip to content

Commit

Permalink
Merge pull request #656 from borismol/fix-aarch64-test-and-branch
Browse files Browse the repository at this point in the history
Fix aarch64 tbz, tbnz, cbz and cbnz instructions estimation
  • Loading branch information
hugsy committed Jun 5, 2021
2 parents 4ae9dbb + c032bf6 commit 1b77c62
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 1b77c62

Please sign in to comment.