Module: wine Branch: master Commit: db09c6c393ff7bdef842f67e62eec275eac7ab89 URL: http://source.winehq.org/git/wine.git/?a=commit;h=db09c6c393ff7bdef842f67e62...
Author: André Hentschel nerv@dawncrow.de Date: Sat Apr 7 22:02:28 2012 +0200
libwine: Add thumb support.
---
libs/wine/port.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/libs/wine/port.c b/libs/wine/port.c index c9d38dc..da74e85 100644 --- a/libs/wine/port.c +++ b/libs/wine/port.c @@ -153,8 +153,12 @@ __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 */ +#if defined(__thumb__) + "blx r2\n\t" /* call func */ +#else "mov LR, PC\n\t" /* return after branch */ "mov PC, r2\n\t" /* call func */ +#endif "mov sp, r4\n\t" /* restore old sp from local var */ "pop {r4,PC}") /* fetch return address into pc */ #elif defined(__sparc__) && defined(__GNUC__)