From dc417ca7cc52e29e08675f6f26041d688d148ba1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 14 Oct 2026 13:08:47 +0200 Subject: [PATCH] CPUEquivalence: Add PPSSPP_CPUFUZZ_ACCURATE_VDOT Co-Authored-By: Claude Opus 5.5 --- docs/cpu-equivalence.md | 1 + unittest/JitHarness.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/docs/cpu-equivalence.md b/docs/cpu-equivalence.md index a6e6e5ecab..7c8a73b386 100644 --- a/docs/cpu-equivalence.md +++ b/docs/cpu-equivalence.md @@ -33,6 +33,7 @@ Environment variables: | `PPSSPP_CPUFUZZ_DUMP` | write every core's end state of every case to a file | | `PPSSPP_CPUFUZZ_STRICT` | fail on any difference, not only on a crash | | `PPSSPP_CPUFUZZ_OPS` | comma-separated instruction name prefixes to generate only; `dot` is the dot products and the prefix ops | +| `PPSSPP_CPUFUZZ_ACCURATE_VDOT` | run with the accurate dot products | For quick rounds while working on some instructions, fuzz just those, on every core of the machine: `PPSSPP_CPUFUZZ_OPS=dot Tools/cpu_fuzz_parallel.py build/PPSSPPUnitTest --count 2000` splits the seeds diff --git a/unittest/JitHarness.cpp b/unittest/JitHarness.cpp index 292d6f82ea..1c39d7d668 100644 --- a/unittest/JitHarness.cpp +++ b/unittest/JitHarness.cpp @@ -398,6 +398,7 @@ bool TestJitReplacementHooks() { // PPSSPP_CPUFUZZ_SKIP cores not to run, by digit: 1 IR interpreter, 2 JIT, 3 JIT IR. // PPSSPP_CPUFUZZ_REPORTS how many differences to minimize and print (default 20). // PPSSPP_CPUFUZZ_STRICT fail the test on any difference, not only on a crash. +// PPSSPP_CPUFUZZ_ACCURATE_VDOT run with AccurateVdot, the VFPU's own dot products. // PPSSPP_CPUFUZZ_OPS comma-separated instruction name prefixes to generate only, for fast // runs on the instructions being worked on. "dot" is the dot products // and the prefixes. Without PPSSPP_CPUFUZZ_CLASSES, the class is "v". @@ -899,6 +900,8 @@ bool TestCPUEquivalence() { // terminating syscall doesn't. const bool oldSkipDeadbeef = g_Config.bSkipDeadbeefFilling; g_Config.bSkipDeadbeefFilling = true; + const bool oldAccurateVdot = g_Config.bAccurateVdot; + g_Config.bAccurateVdot = getenv("PPSSPP_CPUFUZZ_ACCURATE_VDOT") != nullptr; const char *countStr = getenv("PPSSPP_CPUFUZZ_COUNT"); const char *seedStr = getenv("PPSSPP_CPUFUZZ_SEED"); @@ -1049,6 +1052,7 @@ bool TestCPUEquivalence() { mipsr4k.UpdateCore(CPUCore::INTERPRETER); DestroyJitHarness(); g_Config.bSkipDeadbeefFilling = oldSkipDeadbeef; + g_Config.bAccurateVdot = oldAccurateVdot; return success; }