mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-23 14:19:55 -06:00
Hopefully fix fastmem on macOS
This commit is contained in:
@ -687,7 +687,11 @@ bool FaultHandler(FaultDescription& faultDesc)
|
|||||||
rewriteToSlowPath = !MapAtAddress(faultDesc.EmulatedFaultAddr);
|
rewriteToSlowPath = !MapAtAddress(faultDesc.EmulatedFaultAddr);
|
||||||
|
|
||||||
if (rewriteToSlowPath)
|
if (rewriteToSlowPath)
|
||||||
|
{
|
||||||
|
ARMJIT::JitEnableWrite();
|
||||||
faultDesc.FaultPC = ARMJIT::JITCompiler->RewriteMemAccess(faultDesc.FaultPC);
|
faultDesc.FaultPC = ARMJIT::JITCompiler->RewriteMemAccess(faultDesc.FaultPC);
|
||||||
|
ARMJIT::JitEnableExecute();
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -747,7 +751,9 @@ void Init()
|
|||||||
// but something was bad about this so instead we take this vmem eating monster
|
// but something was bad about this so instead we take this vmem eating monster
|
||||||
// which seems to work better.
|
// which seems to work better.
|
||||||
MemoryBase = (u8*)mmap(NULL, AddrSpaceSize*4, PROT_NONE, MAP_ANON | MAP_PRIVATE, -1, 0);
|
MemoryBase = (u8*)mmap(NULL, AddrSpaceSize*4, PROT_NONE, MAP_ANON | MAP_PRIVATE, -1, 0);
|
||||||
|
#if !defined(__APPLE__) && !defined(__FreeBSD__)
|
||||||
munmap(MemoryBase, AddrSpaceSize*4);
|
munmap(MemoryBase, AddrSpaceSize*4);
|
||||||
|
#endif
|
||||||
FastMem9Start = MemoryBase;
|
FastMem9Start = MemoryBase;
|
||||||
FastMem7Start = MemoryBase + AddrSpaceSize;
|
FastMem7Start = MemoryBase + AddrSpaceSize;
|
||||||
MemoryBase = MemoryBase + AddrSpaceSize*2;
|
MemoryBase = MemoryBase + AddrSpaceSize*2;
|
||||||
|
@ -76,9 +76,6 @@ EmuSettingsDialog::EmuSettingsDialog(QWidget* parent) : QDialog(parent), ui(new
|
|||||||
ui->chkJITBranchOptimisations->setChecked(Config::JIT_BranchOptimisations);
|
ui->chkJITBranchOptimisations->setChecked(Config::JIT_BranchOptimisations);
|
||||||
ui->chkJITLiteralOptimisations->setChecked(Config::JIT_LiteralOptimisations);
|
ui->chkJITLiteralOptimisations->setChecked(Config::JIT_LiteralOptimisations);
|
||||||
ui->chkJITFastMemory->setChecked(Config::JIT_FastMemory);
|
ui->chkJITFastMemory->setChecked(Config::JIT_FastMemory);
|
||||||
#ifdef __APPLE__
|
|
||||||
ui->chkJITFastMemory->setDisabled(true);
|
|
||||||
#endif
|
|
||||||
ui->spnJITMaximumBlockSize->setValue(Config::JIT_MaxBlockSize);
|
ui->spnJITMaximumBlockSize->setValue(Config::JIT_MaxBlockSize);
|
||||||
#else
|
#else
|
||||||
ui->chkEnableJIT->setDisabled(true);
|
ui->chkEnableJIT->setDisabled(true);
|
||||||
|
Reference in New Issue
Block a user