mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-03-12 22:56:52 +01:00

When EmitBackpatchRoutine emits slow access code for a load, RS must not be in scratch_gprs/scratch_fprs if we have memchecks (otherwise the memcheck exit won't be able to save RS properly), and RS must be in scratch_gprs/scratch_fprs if we don't have memchecks (otherwise RS will be restored to the value it had before the load, overwriting the result of the load). Let's save callers from having to think about this by embedding the relevant logic inside EmitBackpatchRoutine.