FAILURE MAP
← Case archive

FA-89570 / Instruction set emulation / Member archive

slli shift amount not masked to five bits · case 05

Shifting left by 32 or more clears the register instead of using the low five bits.

Member previewVariant 5 · 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
shift amount masked[[1, 3], [3, 2147483648]][[1, 3], [2, 96], [3, 2147483648]]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 ↗