PowerPC: Simplify TLB resetting

Member initializers and std::array make this trivial for fixed value initialization.
This commit is contained in:
Lioncash
2017-01-18 19:15:46 -05:00
parent b2351ddb29
commit c761f98ede
2 changed files with 6 additions and 19 deletions

View File

@ -172,20 +172,7 @@ void Init(int cpu_core)
ppcState.pagetable_base = 0;
ppcState.pagetable_hashmask = 0;
for (int tlb = 0; tlb < 2; tlb++)
{
for (int set = 0; set < 64; set++)
{
ppcState.tlb[tlb][set].recent = 0;
for (int way = 0; way < 2; way++)
{
ppcState.tlb[tlb][set].paddr[way] = 0;
ppcState.tlb[tlb][set].pte[way] = 0;
ppcState.tlb[tlb][set].tag[way] = TLB_TAG_INVALID;
}
}
}
ppcState.tlb = {};
ResetRegisters();