FAILURE MAP
← Case archive

FA-89543 / Instruction set emulation / Member archive

Writes to the zero register stick · case 03

After writing x0, later instructions reading x0 see a nonzero value.

Member previewVariant 3 · 3 implementations · 8 checks per implementation

Case contract

Input [prog]: [op, rd, a, b] with ops addi (x[a]+b), add, sub, lui (b<<12), slt (signed), sltu (unsigned), sltiu (x[a] < b sign-extended then taken unsigned), srai, srli, slli (shift amount b & 31). Registers x0..x31 start at 0 and hold unsigned 32-bit values; x0 always reads 0 and writes to it are discarded. Return sorted [index, value] of nonzero registers.

Why this case matters

Every RISC emulator implements a register file with a zero register and 32-bit wrapping arithmetic on a host with unbounded integers.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
writes to x0 are discarded[[0, 8], [1, 16], [2, 11]][[2, 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 ↗