libwine: Remove redundant wine_switch_to_stack implementations.

This commit is contained in:
Alexandre Julliard 2011-01-17 12:49:31 +01:00
parent 173b2c5b0f
commit b8f6345d3d
1 changed files with 1 additions and 26 deletions

View File

@ -54,36 +54,11 @@ void wine_pthread_set_functions( const struct wine_pthread_functions *functions,
*
* Switch to the specified stack and call the function.
*/
#if defined(__sparc__) && defined(__GNUC__)
__ASM_GLOBAL_FUNC( wine_switch_to_stack,
"mov %o0, %l0\n\t" /* store first argument */
"mov %o1, %l1\n\t" /* store second argument */
"sub %o2, 96, %sp\n\t" /* store stack */
"call %l0, 0\n\t" /* call func */
"mov %l1, %o0\n\t" /* delay slot: arg for func */
"ta 0x01") /* breakpoint - we never get here */
#elif defined(__powerpc__) && defined(__APPLE__)
__ASM_GLOBAL_FUNC( wine_switch_to_stack,
"mtctr r3\n\t" /* func -> ctr */
"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 */
"bctrl\n" /* call ctr */
"1:\tb 1b") /* loop */
#elif defined(__ALPHA__) && defined(__GNUC__)
__ASM_GLOBAL_FUNC( wine_switch_to_stack,
"mov $16,$0\n\t" /* func */
"mov $17,$16\n\t" /* arg */
"mov $18,$30\n\t" /* stack */
"jsr $31,($0),0\n\t" /* call func */
"L1:\tbr $31,L1") /* loop */
#else
void DECLSPEC_NORETURN wine_switch_to_stack( void (*func)(void *), void *arg, void *stack )
{
wine_call_on_stack( (int (*)(void *))func, arg, stack );
abort();
}
#endif
/***********************************************************************
@ -196,5 +171,5 @@ __ASM_GLOBAL_FUNC( wine_call_on_stack,
"ret\n\t" /* return */
"restore\n\t") /* delay slot: pop */
#else
#error You must implement wine_switch_to_stack for your platform
#error You must implement wine_call_on_stack for your platform
#endif