FAILURE MAP
← Case archive

FA-89387 / Instruction set emulation / Member archive

Taken branch charged as not taken · case 02

Taken branches cost one cycle too few.

Member previewVariant 2 · 3 implementations · 10 checks per implementation

Case contract

Input [pc, disp, taken] for a 2-byte conditional branch at pc in a 16-bit address space. The next instruction is (pc+2) & 0xFFFF; disp is an 8-bit two's complement offset from that address. Not taken: [next, 2]. Taken: target = (next + offset) & 0xFFFF and cost 3 cycles plus 1 when target and next lie on different 256-byte pages. Return [pc', cycles].

Why this case matters

Branch emulation must use the post-fetch PC, sign-extend the offset and charge page-crossing cycles exactly.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
forward branch same page[4116, 2][4116, 3]Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗