Merge pull request #446 from AlexAltea/master

Fixed mtcrf which was wrongly implemented as mtcr
This commit is contained in:
Ben Vanik 2015-11-06 15:11:10 -08:00
commit 35a9697af7
1 changed files with 7 additions and 1 deletions

View File

@ -655,7 +655,13 @@ XEEMITTER(mtcrf, 0x7C000120, XFX)(PPCHIRBuilder& f, InstrData& i) {
f.StoreCR(f.LoadZeroInt64());
}
} else {
f.StoreCR(v);
uint32_t bits = (i.XFX.spr & 0x1FF) >> 1;
for (int b = 0; b <= 7; ++b) {
if (bits & (1 << b)) {
int cri = 7 - b;
f.StoreCR(cri, v);
}
}
}
return 0;
}