FA-89713 / Instruction set emulation / Member archive
Branch-likely delay slot not annulled · case 03
The delay slot of a not-taken branch-likely instruction still executes.
Case contract
Input [prog, limit]: word-indexed instructions at byte addresses 4*i: addi rt rs imm, beq/bne/beql rs rt off16, j index, nop, halt; 8 registers with r0 hardwired to 0. Branch target = branch address + 4 + (sign-extended off16 << 2). The instruction after a branch or jump (its delay slot) always executes before control transfers, except that a not-taken beql skips (annuls) its slot. j target = ((pc+4) & 0xF0000000) | (index << 2). Addresses outside the program behave as halt. Return [executed pcs, registers].
Why this case matters
Emulating MIPS-style pipelines requires executing the architectural delay slot and computing targets from the slot address.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| branch likely not taken annuls slot | [[0, 4, 8, 12, 16], [0, 1, 7, 4, 0, 0, 0, 0]] | [[0, 4, 12, 16], [0, 1, 0, 4, 0, 0, 0, 0]] | 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 ↗