arm64jit: Update rounding mode on thread switch.
Since fcr31 is per-thread, we must update jit state when it changes. This also fixes the rounding mode on load state and jit/interp switch.
This commit is contained in:
parent
7d3fac2b4b
commit
09e307b097
14 changed files with 39 additions and 6 deletions
|
@ -31,6 +31,7 @@
|
|||
#include "Core/MIPS/MIPS.h"
|
||||
#include "Core/CoreTiming.h"
|
||||
#include "Core/MemMapHelpers.h"
|
||||
#include "Core/MIPS/JitCommon/JitCommon.h"
|
||||
#include "Core/Reporting.h"
|
||||
#include "Common/ChunkFile.h"
|
||||
|
||||
|
@ -1460,6 +1461,10 @@ void __KernelLoadContext(ThreadContext *ctx, bool vfpuEnabled)
|
|||
}
|
||||
|
||||
memcpy(currentMIPS->other, ctx->other, sizeof(ctx->other));
|
||||
if (MIPSComp::jit) {
|
||||
// When thread switching, we must update the rounding mode if cached in the jit.
|
||||
MIPSComp::jit->UpdateFCR31();
|
||||
}
|
||||
|
||||
// Reset the llBit, the other thread may have touched memory.
|
||||
currentMIPS->llBit = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue