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:
Unknown W. Brackets committed 2018-04-01 10:12:32 -07:00
1 parent 7d3fac2b4b
commit 09e307b097
14 files changed
+39 -6

No files matched your search

+5
View File
@@ -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;