From 4ffeb057cc581f7139060bba9a6ebc9983fef899 Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Tue, 7 Jul 2015 22:20:36 +1200 Subject: [PATCH] Interpreter: Fix bug with icache emulation. The constructor sets up way_from_valid and way_from_plur as fast lookup tables for implementing the PLRU algrothm. Then the Init function memsets them to zero, meaning the instruction cache will now always choose the first way in each set. This degrades the cache from 128 sets, 8 way to 128 sets, 1 way. Not only does fixing this bug increase accuracy, but it increases preformance too, giving a 1% speedup to interpreter. --- Source/Core/Core/PowerPC/PPCCache.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/Source/Core/Core/PowerPC/PPCCache.cpp b/Source/Core/Core/PowerPC/PPCCache.cpp index 57c798c91c..7244e775bb 100644 --- a/Source/Core/Core/PowerPC/PPCCache.cpp +++ b/Source/Core/Core/PowerPC/PPCCache.cpp @@ -71,8 +71,6 @@ namespace PowerPC { memset(data, 0, sizeof(data)); memset(tags, 0, sizeof(tags)); - memset(way_from_valid, 0, sizeof(way_from_valid)); - memset(way_from_plru, 0, sizeof(way_from_plru)); Reset(); }