wine_call_on_stack Sparc Edition
André Hentschel
nerv at dawncrow.de
Thu Oct 7 12:23:05 CDT 2010
Hi Austin,
This patch is totally untestet! I spend some hours reading into Sparc and this came out :)
But of my experience i am sure with it by about 85%.
So hopefully it works. I guess you really have only to remake libs/wine,
but if somethings wents wrong try compiling kernel32, ntdll and wineboot to see if something gets further, if so remake everything :)
---
libs/wine/port.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/libs/wine/port.c b/libs/wine/port.c
index 3562afa..ab00e09 100644
--- a/libs/wine/port.c
+++ b/libs/wine/port.c
@@ -182,6 +182,18 @@ __ASM_GLOBAL_FUNC( wine_call_on_stack,
"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 */
+#elif defined(__sparc__) && defined(__GNUC__)
+__ASM_GLOBAL_FUNC( wine_call_on_stack,
+ "save %sp, -96, %sp\n\t" /* push: change register window */
+ "mov %sp, %l2\n\t" /* store old sp in local var */
+ "mov %i0, %l0\n\t" /* func */
+ "mov %i1, %l1\n\t" /* arg */
+ "sub %i2, 96, %sp\n\t" /* stack */
+ "call %l0, 0\n\t" /* call func */
+ "mov %l1, %o0\n\t" /* delay slot: arg for func */
+ "mov %l2, %sp\n\t" /* restore old sp from local var */
+ "ret\n\t" /* return */
+ "restore\n\t") /* delay slot: pop */
#else
#error You must implement wine_switch_to_stack for your platform
#endif
--
1.7.3.1.50.g1e633
More information about the wine-patches
mailing list