Motion-Detect Difference Field

Signals & Audio

Two drifting signals become three synchronized difference silhouettes, proving the compiler lowers absolute subtraction correctly at every tested width.

loading core…

Self-running — verified CRC 3482.

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

The operation under test

The common expression a > b ? a - b : b - a can be recognized by LLVM as an absolute-difference operation. This ROM forms that expression for unsigned 8-bit, signed 16-bit, and unsigned 32-bit values, then checks the selected lowering against the same host model.

Visible proof: the three separated bands run the same drifting source geometry through u8, s16, and u32 kernels. Cyan edges and yellow motion silhouettes are computed from the actual probe results; the bottom strip tracks difference energy.

Result: host, default, a16, and xy16 all return 0x3482. No compiler defect was found.

Why three widths?

Each width takes a different legalization path on this 8/16-bit target. Running them together catches both missing opcode coverage and errors in multi-limb subtraction while keeping the visual result directly comparable.

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