1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-03 01:31:55 +00:00

Merge pull request #2548 from sidneycadot/fix-branch-timings

Fixed clock-cycle timing of branch (Bxx) instructions.
This commit is contained in:
Bob Andrews 2024-12-02 00:25:54 +01:00 committed by GitHub
commit 918c39cbeb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -707,8 +707,9 @@ static unsigned HaveIRQRequest;
unsigned char OldPCH; \ unsigned char OldPCH; \
++Cycles; \ ++Cycles; \
Offs = (signed char) MemReadByte (Regs.PC+1); \ Offs = (signed char) MemReadByte (Regs.PC+1); \
Regs.PC += 2; \
OldPCH = PCH; \ OldPCH = PCH; \
Regs.PC = (Regs.PC + 2 + (int) Offs) & 0xFFFF; \ Regs.PC = (Regs.PC + (int) Offs) & 0xFFFF; \
if (PCH != OldPCH) { \ if (PCH != OldPCH) { \
++Cycles; \ ++Cycles; \
} \ } \