André Hentschel : build-env: Don't use ' exchange instruction set' instructions on ARM to fix build on ARMv6 e.g. Nokia N810.

Alexandre Julliard julliard at winehq.org
Tue Sep 21 13:59:26 CDT 2010


Module: wine
Branch: master
Commit: f901fa9769e9eb8e010abb2983a941830b7d430f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f901fa9769e9eb8e010abb2983a941830b7d430f

Author: André Hentschel <nerv at dawncrow.de>
Date:   Mon Sep 20 23:14:18 2010 +0200

build-env: Don't use 'exchange instruction set' instructions on ARM to fix build on ARMv6 e.g. Nokia N810.

---

 libs/wine/port.c         |    3 ++-
 tools/winebuild/import.c |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/libs/wine/port.c b/libs/wine/port.c
index 7cbe5b4..3562afa 100644
--- a/libs/wine/port.c
+++ b/libs/wine/port.c
@@ -178,7 +178,8 @@ __ASM_GLOBAL_FUNC( wine_call_on_stack,
                    "mov sp, r2\n\t"     /* stack */
                    "mov r2, r0\n\t"     /* func -> scratch register */
                    "mov r0, r1\n\t"     /* arg */
-                   "blx r2\n\t"         /* call func */
+                   "mov LR, PC\n\t"     /* return after branch */
+                   "mov PC, r2\n\t"     /* call func */
                    "mov sp, r4\n\t"     /* restore old sp from local var */
                    "pop {r4,PC}")       /* fetch return address into pc */
 #else
diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c
index 1b89352..8c97b32 100644
--- a/tools/winebuild/import.c
+++ b/tools/winebuild/import.c
@@ -1002,7 +1002,7 @@ static void output_delayed_import_thunks( const DLLSPEC *spec )
         output( "\tmov IP,r0\n");
         output( "\tldmfd  SP!, {r4-r10,FP,LR}\n" );
         output( "\tldmfd  SP!, {r0-r3}\n" );
-        output( "\tbx IP\n");
+        output( "\tmov PC,IP\n");
         break;
     case CPU_POWERPC:
         if (target_platform == PLATFORM_APPLE) extra_stack_storage = 56;




More information about the wine-cvs mailing list