CPU/Recompiler: Prevent vixl from using scratch registers

This took too long to find that it was trashing one of our register
cache values. Let it abort instead, until we use the base assembler
instead of the macro assembler.
This commit is contained in:
Connor McLaughlin 2019-12-05 02:03:00 +10:00
parent 914abe64c1
commit 0171dc4241
1 changed files with 6 additions and 0 deletions

View File

@ -86,6 +86,12 @@ CodeGenerator::CodeGenerator(Core* cpu, JitCodeBuffer* code_buffer, const ASMFun
a64::PositionDependentCode),
m_emit(&m_near_emitter)
{
// remove the temporaries from vixl's list to prevent it from using them.
// eventually we won't use the macro assembler and this won't be a problem...
m_near_emitter.GetScratchRegisterList()->Remove(16);
m_near_emitter.GetScratchRegisterList()->Remove(17);
m_far_emitter.GetScratchRegisterList()->Remove(16);
m_far_emitter.GetScratchRegisterList()->Remove(17);
InitHostRegs();
}