Hopefully fix fastmem on macOS

This commit is contained in:
Nadia Holmquist Pedersen 2023-07-24 11:08:13 +02:00
parent 7b948e6ec9
commit 7cd56c6d32
2 changed files with 6 additions and 3 deletions

View File

@ -687,7 +687,11 @@ bool FaultHandler(FaultDescription& faultDesc)
rewriteToSlowPath = !MapAtAddress(faultDesc.EmulatedFaultAddr);
if (rewriteToSlowPath)
{
ARMJIT::JitEnableWrite();
faultDesc.FaultPC = ARMJIT::JITCompiler->RewriteMemAccess(faultDesc.FaultPC);
ARMJIT::JitEnableExecute();
}
return true;
}
@ -747,7 +751,9 @@ void Init()
// but something was bad about this so instead we take this vmem eating monster
// which seems to work better.
MemoryBase = (u8*)mmap(NULL, AddrSpaceSize*4, PROT_NONE, MAP_ANON | MAP_PRIVATE, -1, 0);
#if !defined(__APPLE__) && !defined(__FreeBSD__)
munmap(MemoryBase, AddrSpaceSize*4);
#endif
FastMem9Start = MemoryBase;
FastMem7Start = MemoryBase + AddrSpaceSize;
MemoryBase = MemoryBase + AddrSpaceSize*2;

View File

@ -76,9 +76,6 @@ EmuSettingsDialog::EmuSettingsDialog(QWidget* parent) : QDialog(parent), ui(new
ui->chkJITBranchOptimisations->setChecked(Config::JIT_BranchOptimisations);
ui->chkJITLiteralOptimisations->setChecked(Config::JIT_LiteralOptimisations);
ui->chkJITFastMemory->setChecked(Config::JIT_FastMemory);
#ifdef __APPLE__
ui->chkJITFastMemory->setDisabled(true);
#endif
ui->spnJITMaximumBlockSize->setValue(Config::JIT_MaxBlockSize);
#else
ui->chkEnableJIT->setDisabled(true);