ntdll: Fix Cpsr value in CONTEXT_ARM64

André Hentschel nerv at dawncrow.de
Sun Jun 4 11:51:59 CDT 2017


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 <nerv at dawncrow.de>
---
 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 14c5260..ca169a1 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 */
-- 
2.7.4




More information about the wine-patches mailing list