Skip to content

Commit

Permalink
fixed predict function maybe misleading by zero in branch_predictor_a…
Browse files Browse the repository at this point in the history
…rm.py
  • Loading branch information
hellcatz committed Dec 20, 2024
1 parent 2fa5646 commit 6ea3730
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def get_cpsr(bits: int) -> (bool, bool, bool, bool):

def predict(self, pref_addr: Optional[int] = None) -> BranchPredictor.Prophecy:
prophecy = self.Prophecy()
cur_addr = pref_addr or self.cur_addr
cur_addr = self.cur_addr if pref_addr is None else pref_addr
line = self.disasm(cur_addr)

prophecy.where = cur_addr + line.size
Expand Down

0 comments on commit 6ea3730

Please sign in to comment.