diff --git a/Source/Windows/ARM64EC/Module.cpp b/Source/Windows/ARM64EC/Module.cpp index 388597c85..88cab9773 100644 --- a/Source/Windows/ARM64EC/Module.cpp +++ b/Source/Windows/ARM64EC/Module.cpp @@ -378,7 +378,8 @@ static void LoadStateFromECContext(FEXCore::Core::InternalThreadState* Thread, C // The TEB is the only populated GDT entry by default const auto TEB = reinterpret_cast(NtCurrentTeb()); - State.gdt[(Context.SegGs & 0xffff) >> 3].base = TEB; + State.SetGDTBase(&State.gdt[(Context.SegGs & 0xffff) >> 3], TEB); + State.SetGDTLimit(&State.gdt[(Context.SegGs & 0xffff) >> 3], 0xF'FFFFU); State.gs_cached = TEB; State.fs_cached = 0; State.es_cached = 0;