]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
(__unwind_function): Provide a default definition for implementations
authorRichard Kenner <kenner@gcc.gnu.org>
Thu, 26 Oct 1995 23:24:58 +0000 (19:24 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Thu, 26 Oct 1995 23:24:58 +0000 (19:24 -0400)
that don't yet have a function unwinder.

From-SVN: r10524

gcc/libgcc2.c

index ab13f447ecab38037fa221675b57a9b8154e1d04..d266a4a9226d5e200f151082a5d3befce80380ab 100644 (file)
@@ -2349,18 +2349,16 @@ __unwind_function(void *ptr)
   /* This is a test routine, as we have to dynamically probe to find out
      what to pop for certain, this is just a guess. */
   asm("leal -16(%ebp),%esp");
-  asm("pop %eax"); /* really for popl %ebx */
-  asm("pop %eax"); /* really for popl %esi */
-  asm("pop %eax"); /* really for popl %edi */
+  asm("pop %ebx");
+  asm("pop %esi");
+  asm("pop %edi");
   asm("movl %ebp,%esp");
   asm("popl %ebp");
 
   asm("movl %ecx,0(%esp)");
   asm("ret");
 }
-#endif
-
-#if #machine(rs6000)
+#elif #machine(rs6000)
 __unwind_function(void *ptr)
 {
   asm("mr 31,1");
@@ -2376,9 +2374,7 @@ __unwind_function(void *ptr)
   asm("# br");
   asm("mtctr 3;bctr # b 3");
 }
-#endif /* rs6000 */
-
-#if #machine(powerpc)
+#elif #machine(powerpc)
 __unwind_function(void *ptr)
 {
   asm("mr 31,1");
@@ -2394,6 +2390,11 @@ __unwind_function(void *ptr)
   asm("# br");
   asm("mtctr 3;bctr # b 3");
 }
+#else
+__unwind_function(void *ptr)
+{
+  abort ();
+}
 #endif /* powerpc */
 #endif /* L_eh */
 \f