From 99db4c697d0349f31879126adcb9d365383513c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Hentschel?= Date: Sun, 4 Jun 2017 18:51:59 +0200 Subject: [PATCH] ntdll: Fix Cpsr value in CONTEXT_ARM64. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The CPU can be configured to not allow reading DAIF in EL0t (User Mode), and for debugging purpose NZCV might be more interesting. Reported by Stefan Dösinger Signed-off-by: André Hentschel Signed-off-by: Alexandre Julliard --- dlls/ntdll/signal_arm64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c index 14c5260c148..ca169a12df2 100644 --- a/dlls/ntdll/signal_arm64.c +++ b/dlls/ntdll/signal_arm64.c @@ -185,7 +185,7 @@ __ASM_STDCALL_FUNC( RtlCaptureContext, 8, "mov w1, #0x400000\n\t" /* CONTEXT_ARM64 */ "add w1, w1, #0x3\n\t" /* CONTEXT_FULL */ "str w1, [x0]\n\t" /* context->ContextFlags */ /* 32-bit, look at cpsr */ - "mrs x1, DAIF\n\t" + "mrs x1, NZCV\n\t" "str w1, [x0, #0x4]\n\t" /* context->Cpsr */ "ldp x0, x1, [sp], #32\n\t" "str x0, [x0, #0x8]\n\t" /* context->X0 */