[vm] Populate LR in Windows ARM[64] thread interrupter.

Cf. fb24668989

TEST=ci (--profile_vm=false)
Bug: https://github.com/dart-lang/sdk/issues/52969
Change-Id: I093e57952186b8a6f6cb75fce2465b14b24c3a00
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329563
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
Ryan Macnak 2023-10-09 17:23:23 +00:00 committed by Commit Queue
parent 20d598c7ce
commit a97b1a7c0f

View file

@ -40,21 +40,25 @@ class ThreadInterrupterWin : public AllStatic {
state->fp = static_cast<uintptr_t>(context.Ebp);
state->csp = static_cast<uintptr_t>(context.Esp);
state->dsp = static_cast<uintptr_t>(context.Esp);
state->lr = 0;
#elif defined(HOST_ARCH_X64)
state->pc = static_cast<uintptr_t>(context.Rip);
state->fp = static_cast<uintptr_t>(context.Rbp);
state->csp = static_cast<uintptr_t>(context.Rsp);
state->dsp = static_cast<uintptr_t>(context.Rsp);
state->lr = 0;
#elif defined(HOST_ARCH_ARM)
state->pc = static_cast<uintptr_t>(context.Pc);
state->fp = static_cast<uintptr_t>(context.R11);
state->csp = static_cast<uintptr_t>(context.Sp);
state->dsp = static_cast<uintptr_t>(context.Sp);
state->lr = static_cast<uintptr_t>(context.R14);
#elif defined(HOST_ARCH_ARM64)
state->pc = static_cast<uintptr_t>(context.Pc);
state->fp = static_cast<uintptr_t>(context.Fp);
state->csp = static_cast<uintptr_t>(context.Sp);
state->dsp = static_cast<uintptr_t>(context.X15);
state->lr = static_cast<uintptr_t>(context.Lr);
#else
#error Unsupported architecture.
#endif