libwine: Implemented the wine_call_on_stack function for ARM64.

This commit is contained in:
André Hentschel 2013-01-16 00:41:58 +01:00 committed by Alexandre Julliard
parent f9727320da
commit 16954b3a82

View file

@ -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 */