64-Bit Limb-Seam Barrel

Ciphers & Bit Tricks

A striped 64-bit texture passes through left, logical-right, and sign-preserving right shifters while the count crosses every dangerous limb boundary.

loading core…

Self-running — verified CRC 2007.

Click the screen, then play. (Tab away and it pauses.)

The seams under test

The runtime count repeatedly visits 15/16/17 and 31/32/33, plus the 47/48/49 and 62/63 edges. Those are the points where a multi-limb shift changes which 16-bit word supplies bits to its neighbor.

Operations: variable shl i64, lshr i64, and ashr i64 all form and pass the machine verifier when the count is explicitly widened to 64 bits.

Result: host, default, a16, and xy16 all return 0x2007 on MAME and bsnes-jg.

What the barrel shows

The upper cyan band shifts left, the middle cyan band shifts logically right, and the lower blue/gold band shifts arithmetically right so sign fill stays visible. The bottom cursor marks the active four-bit group.

Related finding

The natural narrow-count form uint64 << uint8 still exposes an unlegalizable G_ANYEXT s8 to s64. The published ROM widens the count before the operation; the narrow reproducer remains in the source tree for the backend fix.

Compiler stress-test #138, Round 7. Source and full test record live in llvm-mos-65816.