__builtin_return_address update for SUNPRO_C on sparc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I should have known better than to try and mix asm code and C looping 
constructs.  Here's a version of __builtin_return_address that works.

License: LGPL/X11
Diffed against 20020710 snapshot.

ChangeLog: include/winnt.h
 - Fixed __builtin_return_address

Gregg Mattinson
Co-op Developer
Sun Microsystems of Canada

Index: include/winnt.h
===================================================================
RCS file: /opcom/comp/ws/wine/CVSROOT/wine/include/winnt.h,v
retrieving revision 1.2
diff -u -r1.2 winnt.h
--- /tmp/T0ryaidh       Fri Jul 19 10:15:39 2002
+++ winnt.h     Fri Jul 19 10:14:31 2002
@@ -1142,9 +1142,15 @@
 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

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux