=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: libwine: Implemented the wine_call_on_stack function for ARM64.
Alexandre Julliard
julliard at winehq.org
Wed Jan 16 13:47:43 CST 2013
Module: wine
Branch: master
Commit: 16954b3a821f9585f88ce807a2b15d650ec982e0
URL: http://source.winehq.org/git/wine.git/?a=commit;h=16954b3a821f9585f88ce807a2b15d650ec982e0
Author: André Hentschel <nerv at dawncrow.de>
Date: Wed Jan 16 00:41:58 2013 +0100
libwine: Implemented the wine_call_on_stack function for ARM64.
---
libs/wine/port.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/libs/wine/port.c b/libs/wine/port.c
index 8e8caf8..87e5833 100644
--- a/libs/wine/port.c
+++ b/libs/wine/port.c
@@ -156,6 +156,19 @@ __ASM_GLOBAL_FUNC( wine_call_on_stack,
"blx r2\n\t" /* call func */
"mov sp, r4\n\t" /* restore old sp from local var */
"pop {r4,PC}") /* fetch return address into pc */
+#elif defined(__aarch64__) && defined(__GNUC__)
+__ASM_GLOBAL_FUNC( wine_call_on_stack,
+ "stp x29, x30, [sp,#-32]!\n\t" /* save return address on stack */
+ "str x19, [sp,#16]\n\t" /* save register on stack */
+ "mov x19, sp\n\t" /* store old sp in local var */
+ "mov sp, x2\n\t" /* stack */
+ "mov x2, x0\n\t" /* func -> scratch register */
+ "mov x0, x1\n\t" /* arg */
+ "blr x2\n\t" /* call func */
+ "mov sp, x19\n\t" /* restore old sp from local var */
+ "ldr x19, [sp,#16]\n\t" /* restore register from stack */
+ "ldp x29, x30, [sp],#32\n\t" /* restore return address */
+ "ret") /* return */
#elif defined(__sparc__) && defined(__GNUC__)
__ASM_GLOBAL_FUNC( wine_call_on_stack,
"save %sp, -96, %sp\n\t" /* push: change register window */
More information about the wine-cvs
mailing list