mirror of
https://github.com/MacosPorters/betterxen.git
synced 2026-11-26 14:50:43 +00:00
The nine SOP2 forms and twelve VOPC integer compares had known answers for a few chosen inputs only. This harness generates their operand domains (boundary values, 64-bit carry and borrow chains observing both words, aliased registers, every integer inline constant, literals, s105 and v255, partial and zero EXEC with VCC seeded to -1, VCCZ through s_cbranch_vccz, 32 distinct lane inputs) and runs each case on the reference interpreter and on native Metal against expectations written out from the public RDNA 2 guide in oracle.rs, which imports no Xenora crate. Rejections cover a missing literal word (as truncated) and encodings outside Xenora's subset (two literal selectors, VCC/TTMP/M0/ EXEC destinations, float inline constants), at the expected offset. 4788 cases and 498 rejections. Failures are listed per family. The Metal part compiles its 1777 distinct programs on four threads: 16 s with a cold shader cache on an M5 Pro, against 47 s on one thread. The oracle agrees with an independent guide-only table on 436 of 440 cases; the other 4 are s_subb_u32 with S1 = 0xffffffff and SCC set, where the guide leaves the width of S1 + SCC open. The oracle reads it at full width and keeps those cases in their own family. Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>