Merge pull request #148 from chrisps/canary_experimental

Do not check if we should show the prefetchw error message if we alre…
This commit is contained in:
chrisps 2023-04-02 17:37:05 -04:00 committed by GitHub
commit 190cef9872
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 8 deletions

View File

@ -25,13 +25,17 @@ class StartupCpuFeatureCheck {
"the "
"FAQ for system requirements at https://xenia.jp";
}
unsigned int data[4];
Xbyak::util::Cpu::getCpuid(0x80000001, data);
if (!(data[2] & (1U << 8))) {
error_message =
"Your cpu does not support PrefetchW, which Xenia Canary "
"requires.";
#if 0
if (!error_message) {
unsigned int data[4];
Xbyak::util::Cpu::getCpuid(0x80000001, data);
if (!(data[2] & (1U << 8))) {
error_message =
"Your cpu does not support PrefetchW, which Xenia Canary "
"requires.";
}
}
#endif
if (error_message == nullptr) {
return;
} else {

View File

@ -807,8 +807,14 @@ int InstrEmit_mtmsr(PPCHIRBuilder& f, const InstrData& i) {
int InstrEmit_mtmsrd(PPCHIRBuilder& f, const InstrData& i) {
//todo: this is moving msr under a mask, so only writing EE and RI
f.StoreContext(offsetof(PPCContext, scratch),
f.ZeroExtend(f.LoadGPR(i.X.RT), INT64_TYPE));
Value* from = f.LoadGPR(i.X.RT);
Value* mtmsrd_mask = f.LoadConstantUint64((1ULL << 15));
Value* msr = f.LoadContext(offsetof(PPCContext, msr), INT64_TYPE);
Value* new_msr = f.Or(f.And(from, mtmsrd_mask), f.AndNot(msr, mtmsrd_mask));
f.StoreContext(offsetof(PPCContext, msr), new_msr);
return 0;
}