libs/wine: Fix ARM support.
This commit is contained in:
parent
16060356ee
commit
c704758a2f
|
@ -171,20 +171,16 @@ __ASM_GLOBAL_FUNC( wine_call_on_stack,
|
||||||
"lwz 0, 4(1)\n\t" /* fetch return address */
|
"lwz 0, 4(1)\n\t" /* fetch return address */
|
||||||
"mtlr 0\n\t" /* return address -> lr */
|
"mtlr 0\n\t" /* return address -> lr */
|
||||||
"blr") /* return */
|
"blr") /* return */
|
||||||
#elif defined(__arm__)
|
#elif defined(__arm__) && defined(__GNUC__)
|
||||||
__ASM_GLOBAL_FUNC( wine_call_on_stack,
|
__ASM_GLOBAL_FUNC( wine_call_on_stack,
|
||||||
"str r14, [r13, #4]\n\t" /* save return address on stack */
|
"push {r4,LR}\n\t" /* save return address on stack */
|
||||||
"sub r2, r2, #16\n\t" /* reserve space on new stack */
|
"mov r4, sp\n\t" /* store old sp in local var */
|
||||||
"str r13, [r2, #12]\n\t" /* store old sp */
|
"mov sp, r2\n\t" /* stack */
|
||||||
"mov r3, r0\n\t" /* func */
|
"mov r2, r0\n\t" /* func -> scratch register */
|
||||||
"mov r0, r1\n\t" /* arg */
|
"mov r0, r1\n\t" /* arg */
|
||||||
"mov r13, r2\n\t" /* stack */
|
"blx r2\n\t" /* call func */
|
||||||
"mov r2, #0\n\t" /* zero */
|
"mov sp, r4\n\t" /* restore old sp from local var */
|
||||||
"str r2, [r13]\n\t" /* bottom of stack */
|
"pop {r4,PC}") /* fetch return address into pc */
|
||||||
"sub r13, r13, #16\n\t" /* create a frame for this function */
|
|
||||||
"blx r3\n\t" /* call func */
|
|
||||||
"ldr r13, [r13, #28]\n\t" /* fetch old sp */
|
|
||||||
"ldr r15, [r13, #4]") /* fetch return address and return */
|
|
||||||
#else
|
#else
|
||||||
#error You must implement wine_switch_to_stack for your platform
|
#error You must implement wine_switch_to_stack for your platform
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue