Fixed __builtin_return_address.

This commit is contained in:
Gregg Mattinson 2002-07-20 18:53:34 +00:00 committed by Alexandre Julliard
parent e1db8bd0e2
commit 6132474cf3
1 changed files with 8 additions and 2 deletions

View File

@ -1142,9 +1142,15 @@ typedef CONTEXT *PCONTEXT;
static DWORD __builtin_return_address(int p_iDepth)
{
asm("ta 3");
asm("tst %i0");
asm("be End");
asm("mov %fp, %l0");
while (p_iDepth--)
asm("ld [%l0+56], %l0");
asm("Start:");
asm("sub %i0, 1, %i0");
asm("tst %i0");
asm("bne Start");
asm("ld [%l0+56], %l0");
asm("End:");
asm("ld [%l0+60], %i0");
}
#endif