Implemented SYSDEPS_CallOnStack for sparcs.
This commit is contained in:
parent
04fd4a2756
commit
1cae4793da
|
@ -256,12 +256,23 @@ __declspec(naked) void SYSDEPS_CallOnStack( void (*func)(LPVOID), LPVOID arg )
|
||||||
__asm int 3;
|
__asm int 3;
|
||||||
}
|
}
|
||||||
# endif /* defined(__GNUC__) || defined(_MSC_VER) */
|
# endif /* defined(__GNUC__) || defined(_MSC_VER) */
|
||||||
#else /* !defined(__i386__) */
|
#elif __sparc__
|
||||||
|
# ifdef __GNUC__
|
||||||
|
__ASM_GLOBAL_FUNC( SYSDEPS_CallOnStack,
|
||||||
|
"mov %o0, %l0\n\t" /* store first argument */
|
||||||
|
"call " __ASM_NAME("NtCurrentTeb") ", 0\n\t"
|
||||||
|
"mov %o1, %l1\n\t" /* delay slot: store second argument */
|
||||||
|
"ld [%o0+4], %sp\n\t" /* teb->stack_top */
|
||||||
|
"call %l0, 0\n\t" /* call func */
|
||||||
|
"mov %l1, %o0\n\t" /* delay slot: arg for func */
|
||||||
|
"ta 0x01\n\t"); /* breakpoint - we never get here */
|
||||||
|
# else /* !defined(__GNUC__) */
|
||||||
void SYSDEPS_CallOnStack( void (*func)(LPVOID), LPVOID arg )
|
void SYSDEPS_CallOnStack( void (*func)(LPVOID), LPVOID arg )
|
||||||
{
|
{
|
||||||
func( arg );
|
func( arg );
|
||||||
while(1); /* avoid warning */
|
while(1); /* avoid warning */
|
||||||
}
|
}
|
||||||
|
# endif /* !defined(__GNUC__) */
|
||||||
#endif /* !defined(__i386__) */
|
#endif /* !defined(__i386__) */
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue