public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* gcj for ARM EABI: Use __cxa_end_cleanup
@ 2007-08-14 15:21 Andrew Haley
  0 siblings, 0 replies; only message in thread
From: Andrew Haley @ 2007-08-14 15:21 UTC (permalink / raw)
  To: java-patches, gcc-patches

We need to call "__cxa_end_cleanup" when resuming after a cleanup.
This may seem odd, given that this is part of libstdc++ rather than
the language independent unwinder, but the personality routines call
__cxa_begin_cleanup, and these functions must be used in pairs.

Andrew.


Index: gcc/java/decl.c2007-08-14  Andrew Haley  <aph@all6500.kos.to>

        * decl.c (java_init_decl_processing): Call "__cxa_end_cleanup"
        when using the ARM EABI.

===================================================================
--- gcc/java/decl.c     (revision 126985)
+++ gcc/java/decl.c     (working copy)
@@ -1077,7 +1077,10 @@
   eh_personality_libfunc = init_one_libfunc (USING_SJLJ_EXCEPTIONS
                                              ? "__gcj_personality_sj0"
                                              : "__gcj_personality_v0");
-  default_init_unwind_resume_libfunc ();
+  if (targetm.arm_eabi_unwinder)
+    unwind_resume_libfunc = init_one_libfunc ("__cxa_end_cleanup");
+  else
+    default_init_unwind_resume_libfunc ();
 
   lang_eh_runtime_type = do_nothing;
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-08-14 15:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-14 15:21 gcj for ARM EABI: Use __cxa_end_cleanup Andrew Haley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).