Skip to content

Commit

Permalink
[C++][NFC] Simplify on_inc_r_reg().
Browse files Browse the repository at this point in the history
  • Loading branch information
kosarev committed Aug 19, 2024
1 parent f4bc1a3 commit c4bfa3f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions z80.h
Original file line number Diff line number Diff line change
Expand Up @@ -2450,10 +2450,8 @@ class internals::executor_base : public B {
return n; }

void on_inc_r_reg() {
// TODO: Consider splitting R into R[7] and R[6:0].
fast_u8 r = self().on_get_r();
r = (r & 0x80) | (inc8(r) & 0x7f);
self().on_set_r(r); }
self().on_set_r((r & 0x80) | ((r + 1) & 0x7f)); }

fast_u8 on_m1_fetch_cycle() {
fast_u8 n = self().on_fetch_cycle();
Expand Down

0 comments on commit c4bfa3f

Please sign in to comment.