Link return address in wine_switch_to_stack on ppc
Simon Richter
Simon.Richter at hogyros.de
Sat May 31 03:49:31 CDT 2008
While the callee should not return in any case, it currently returns to
some address that accidentally happens to be on the stack. After this
change, it returns to an endless loop.
---
libs/wine/port.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libs/wine/port.c b/libs/wine/port.c
index e2f7b0c..76a7586 100644
--- a/libs/wine/port.c
+++ b/libs/wine/port.c
@@ -90,14 +90,14 @@ __ASM_GLOBAL_FUNC( wine_switch_to_stack,
"mr r3,r4\n\t" /* args -> function param 1 (r3) */
"mr r1,r5\n\t" /* stack */
"subi r1,r1,0x100\n\t" /* adjust stack pointer */
- "bctr\n" /* call ctr */
+ "bctrl\n" /* call ctr */
"1:\tb 1b") /* loop */
#elif defined(__powerpc__) && defined(__GNUC__)
__ASM_GLOBAL_FUNC( wine_switch_to_stack,
"mtctr 3\n\t" /* func -> ctr */
"mr 3,4\n\t" /* args -> function param 1 (r3) */
"mr 1,5\n\t" /* stack */
- "bctr\n\t" /* call ctr */
+ "bctrl\n\t" /* call ctr */
"1:\tb 1b") /* loop */
#elif defined(__ALPHA__) && defined(__GNUC__)
__ASM_GLOBAL_FUNC( wine_switch_to_stack,
--
1.5.5.2
More information about the wine-patches
mailing list