Far-Pointer Order Shuffle

Algorithms & Data

Eight far pointers shuffle into address order while their adjacent cross-bank gaps drive the lower trace.

loading core…

Self-running — verified CRC 5B40.

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

The compiler path under test

The target C source builds an array of genuine address_space(2) pointers, insertion-sorts it with natural pointer >, and subtracts adjacent pointers. The data straddles a 64K boundary while keeping every difference representable by the ABI's 16-bit ptrdiff_t.

Finding: the first natural build exposed two missing InstructionSelect paths: an Imag8-backed s8 to s1 truncation crashed the selector, and legal Imag32 s32 to s16 truncation had no pattern.

Fix: constrain the boolean source through the accumulator and select the low 16-bit Imag32 subregister directly. Focused LLVM regressions plus the real-object machine verifier pass.

Result: host, a16, and xy16 return 0x5B40 on MAME and bsnes-jg.

What it shows

The upper lanes show the sorted pointer bank order; the lower bars encode adjacent pointer gaps. A moving scan line keeps the verified result visibly alive.

Compiler stress-test #129, Round 7.