Skip to content

Commit

Permalink
Bad cycle calculation for block LDs
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanizag committed Jul 31, 2023
1 parent 984d431 commit 5104ffc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/opcode_ld.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ pub fn build_ld_block((inc, repeat, postfix) : (bool, bool, &'static str)) -> Op

if repeat && bc != 0 {
// Back to redo the instruction
env.set_branch_taken();
let pc = env.state.reg.pc().wrapping_sub(2);
env.state.reg.set_pc(pc);
}
Expand Down

0 comments on commit 5104ffc

Please sign in to comment.