=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: ntdll: Adjust PC according to THUMB /ARM flag.
Alexandre Julliard
julliard at winehq.org
Fri Aug 23 09:31:23 CDT 2019
Module: wine
Branch: stable
Commit: 7b61745e3891a486d41c579d58fb6930fc261c09
URL: https://source.winehq.org/git/wine.git/?a=commit;h=7b61745e3891a486d41c579d58fb6930fc261c09
Author: André Hentschel <nerv at dawncrow.de>
Date: Wed Mar 27 13:48:12 2019 +0100
ntdll: Adjust PC according to THUMB/ARM flag.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46189
Signed-off-by: André Hentschel <nerv at dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit abca25b30f712f80b9bcd29af7096d68d11596a9)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
dlls/ntdll/signal_arm.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/signal_arm.c b/dlls/ntdll/signal_arm.c
index 4f505db..82f1fa8 100644
--- a/dlls/ntdll/signal_arm.c
+++ b/dlls/ntdll/signal_arm.c
@@ -283,9 +283,12 @@ __ASM_STDCALL_FUNC( RtlCaptureContext, 4,
void DECLSPEC_HIDDEN set_cpu_context( const CONTEXT *context );
__ASM_GLOBAL_FUNC( set_cpu_context,
".arm\n\t"
- "ldr r1, [r0, #0x44]\n\t" /* context->Cpsr */
- "msr CPSR_f, r1\n\t"
+ "ldr r2, [r0, #0x44]\n\t" /* context->Cpsr */
+ "tst r2, #0x20\n\t" /* thumb? */
"ldr r1, [r0, #0x40]\n\t" /* context->Pc */
+ "orrne r1, r1, #1\n\t" /* Adjust PC according to thumb */
+ "biceq r1, r1, #1\n\t" /* Adjust PC according to arm */
+ "msr CPSR_f, r2\n\t"
"ldr lr, [r0, #0x3c]\n\t" /* context->Lr */
"ldr sp, [r0, #0x38]\n\t" /* context->Sp */
"push {r1}\n\t"
More information about the wine-cvs
mailing list