FAILURE MAP
← Case archive

FA-89454 / Instruction set emulation / Member archive

Branch immediate bits 11 and 12 swapped · case 04

Branches with only one of offset bits 11/12 set go to the wrong target and may flip direction.

Member previewVariant 4 · 3 implementations · 10 checks per implementation

Case contract

Input [word]: a 32-bit instruction. By opcode (low 7 bits): I-type 0x13/0x03/0x67 imm = sext(word[31:20]); S-type 0x23 imm = sext(word[31:25]:word[11:7]); B-type 0x63 imm = sext(word[31]:word[7]:word[30:25]:word[11:8]:0) (13 bits); U-type 0x37/0x17 imm = word & 0xFFFFF000 as signed 32-bit; J-type 0x6F imm = sext(word[31]:word[19:12]:word[20]:word[30:21]:0) (21 bits). Return [format, imm].

Why this case matters

Instruction decoders reassemble scattered immediate bits; a single misplaced bit sends branches and stores to the wrong address.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
branch backward["B", 2056]["B", -4088]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 ↗