mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-09 17:00:19 +02:00
ARM64EC: Map TF to PSTATE.SS when reconstructing a native context
This commit is contained in:
1 parent
9bb9e954c2
commit
507a95b817
1 file changed
+6
-1
@@ -374,9 +374,14 @@ static ARM64_NT_CONTEXT ReconstructPackedECContext(ARM64_NT_CONTEXT& Context) {
|
||||
ECContext.X24 = 0;
|
||||
ECContext.X28 = 0;
|
||||
|
||||
// NZCV will be converted into EFlags by ntdll, the rest are lost during exception handling.
|
||||
// NZCV+SS will be converted into EFlags by ntdll, the rest are lost during exception handling.
|
||||
// See HandleGuestException
|
||||
ECContext.Cpsr = Context.Cpsr;
|
||||
uint32_t EFlags = CTX->ReconstructCompactedEFLAGS(Thread, false, nullptr, 0);
|
||||
if (EFlags & (1U << FEXCore::X86State::RFLAG_TF_LOC)) {
|
||||
ECContext.Cpsr |= 1 << 21; // PSTATE.SS
|
||||
}
|
||||
|
||||
ECContext.Fpcr = Context.Fpcr;
|
||||
ECContext.Fpsr = Context.Fpsr;
|
||||
|
||||
|
||||
Reference in new issue
Block a user