mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-30 01:29:52 -06:00
fix for fastmem when pc is used as immediate
and (hopefully) make SIGSEGV handler work for aarch64 linux
This commit is contained in:
@ -179,7 +179,7 @@ public:
|
||||
|
||||
Gen::OpArg MapReg(int reg)
|
||||
{
|
||||
if (reg == 15 && RegCache.Mapping[reg] == Gen::INVALID_REG)
|
||||
if (reg == 15 && !(RegCache.LoadedRegs & (1 << 15)))
|
||||
return Gen::Imm32(R15);
|
||||
|
||||
assert(RegCache.Mapping[reg] != Gen::INVALID_REG);
|
||||
|
@ -183,6 +183,12 @@ void Compiler::Comp_MemAccess(int rd, int rn, const Op2& op2, int size, int flag
|
||||
|
||||
if (Config::JIT_FastMemory && ((!Thumb && CurInstr.Cond() != 0xE) || ARMJIT_Memory::IsFastmemCompatible(expectedTarget)))
|
||||
{
|
||||
if (rdMapped.IsImm())
|
||||
{
|
||||
MOV(32, R(RSCRATCH4), rdMapped);
|
||||
rdMapped = R(RSCRATCH4);
|
||||
}
|
||||
|
||||
u8* memopStart = GetWritableCodePtr();
|
||||
LoadStorePatch patch;
|
||||
|
||||
|
Reference in New Issue
Block a user