Module: wine Branch: master Commit: 42a5885669e35f13725ab8e36d3a95132bd49ffc URL: https://source.winehq.org/git/wine.git/?a=commit;h=42a5885669e35f13725ab8e36...
Author: Martin Storsjo martin@martin.st Date: Thu May 28 11:14:41 2020 +0300
ntdll: Store the real stack pointer in RtlCaptureContext.
In most cases, unwinding will use the frame pointer anyway, so it doesn't make much of a difference, but for cases where it won't, capture the actual stack pointer.
(In most cases on arm64, calling the RtlCaptureContext won't cause anything extra to be pushed on the stack at that point anyway).
Signed-off-by: Martin Storsjo martin@martin.st Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ntdll/signal_arm64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c index b364f08e9a..4c9017b9e2 100644 --- a/dlls/ntdll/signal_arm64.c +++ b/dlls/ntdll/signal_arm64.c @@ -265,8 +265,8 @@ __ASM_STDCALL_FUNC( RtlCaptureContext, 8, "stp x23, x24, [x0, #0xc0]\n\t" /* context->X23,X24 */ "stp x25, x26, [x0, #0xd0]\n\t" /* context->X25,X26 */ "stp x27, x28, [x0, #0xe0]\n\t" /* context->X27,X28 */ - "stp x29, x30, [x0, #0xf0]\n\t" /* context->Fp,Lr */ - "add x1, x29, #0x10\n\t" + "stp x29, x30, [x0, #0xf0]\n\t" /* context->Fp,Lr */ + "mov x1, sp\n\t" "stp x1, x30, [x0, #0x100]\n\t" /* context->Sp,Pc */ "mov w1, #0x400000\n\t" /* CONTEXT_ARM64 */ "add w1, w1, #0x3\n\t" /* CONTEXT_FULL */