Skip to content

tests: Dolphin-differential PPC oracle suite - #9

Closed
aharonahdoot wants to merge 2 commits into
ExpansionPak:mainfrom
aharonahdoot:pr-oracle-suite
Closed

tests: Dolphin-differential PPC oracle suite#9
aharonahdoot wants to merge 2 commits into
ExpansionPak:mainfrom
aharonahdoot:pr-oracle-suite

Conversation

@aharonahdoot

@aharonahdoot aharonahdoot commented Jul 8, 2026

Copy link
Copy Markdown

Slimmed way down after the feedback — fair points on size. What's left is 988 lines, 8 files, no external dependencies: it runs via ctest with just a C compiler, same as the rest of your suite. (Also removed the stray .map build artifact, sorry about that.)

  • tests/diff/: a probe corpus that decodes + emits each case through the real emitter, runs the generated C, and byte-compares registers/flags/memory against real-Gekko expectations. Single-instruction probes catch local opcode semantics; sequence probes catch bugs that only surface when a later instruction consumes a wrong result.
  • A small dedicated suite for control/system forms that can't sit in the fall-through matrix (26 cases).
  • Known emitter defects are catalogued as xfail. An XPASS fails the run — meaning you fixed one and the catalog entry should be retired, so the catalog can't rot. Your recent emitter work already retired 14 entries this way.

This slots in beside test_pc_reference rather than replacing anything: pc_reference covers the interpreter, codegen_compile checks emitted C compiles — this covers what the emitted C computes.

The heavier Dolphin-capture oracle from the earlier version of this PR now stays in my fork; I'll file anything it finds as regular issues.

Squash-merge if you take it — the second commit just removes build artifacts I fat-fingered in.

…rol forms)

Decode+emit probes through the real emitter, run the generated C, and
byte-compare architectural state against real-Gekko expectations.
Known emitter defects are catalogued as xfail; an XPASS fails the run so
the catalog cannot go stale. Runs via ctest with just a C compiler.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants