Fix cache detection assertion failure

This was SVN commit r9085.
This commit is contained in:
Ykkrosh 2011-03-19 15:16:14 +00:00
parent 0af8cdc54a
commit 44e1a863e1

View File

@ -230,10 +230,10 @@ static bool DetectCache()
x86_x64_Cache cache;
cache.Initialize(level, type);
cache.numEntries = cache.associativity * partitions * sets;
cache.entrySize = (size_t)bits(regs.ebx, 0, 11)+1; // (yes, this also uses +1 encoding)
cache.associativity = (size_t)bits(regs.ebx, 22, 31)+1;
cache.sharedBy = (size_t)bits(regs.eax, 14, 25)+1;
cache.numEntries = cache.associativity * partitions * sets;
AddCache(cache);
}