IR: Compile data cache ops to nothing

The interpreter does nothing for any cache op but icache invalidation, but
the IR only knew four of them and sent the rest to the interpreter one at
a time. Media Engine code flushes its data cache with a loop of 0x14s,
often every pass of its main loop: with the ME emulated (on a branch),
mcidclan's me-simple-count went from 15.9 to 1.0 seconds for 3 emulated
ones.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-10-20 21:18:21 +02:00
1 parent 6ce91d4bdb
commit c5d2adb303
1 file changed
+3 -7
+3 -7
View File
@@ -158,13 +158,9 @@ namespace MIPSComp {
int func = (op >> 16) & 0x1F;
// See Int_Cache for the definitions.
switch (func) {
case 24: break;
case 25: break;
case 27: break;
case 30: break;
default:
// See Int_Cache: only icache invalidation does anything, so the data cache ops (which ME
// code loops over to flush its cache) compile to nothing.
if (func == 8) {
// Fall back to the interpreter.
DISABLE;
}