This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

3.4 PATCH: Allow overriding MUST_USE_SJLJ_EXCEPTIONS


It turned out that this patch

	http://gcc.gnu.org/ml/gcc-patches/2003-09/msg01118.html

didn't achieve the desired effect.  Since the new runtime-variable
definition of DWARF2_UNWIND_INFO in iris6.h isn't a constant any longer,
the preprocessor evaluates it to 0, and MUST_USE_SJLJ_EXCEPTIONS is forced
to 1.  (It took me some time to find this, in the end, -Wundef proved to be
very helpful.  I wonder what other errors of this kind will show up in a
bootstrap with -Wundef.)  In order to allow M_U_S_E to be runtime-variable
as well, I need to be able to override it from the target configuration
instead.  The following patch does just that, reverting the previous
change.  The corresponding iris6.h change that uses this ability will be
submitted separately.

Bootstrapped without regressions on mips-sgi-irix6.5 (with the full set of
IRIX 6 cleanup/O32 integration patches, to be submitted shortly).

Ok for mainline?

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University


Fri Sep 26 02:07:20 2003  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* except.h (MUST_USE_SJLJ_EXCEPTIONS): Revert 2003-09-23 change.
	Allow override.
	* doc/tm.texi (MUST_USE_SJLJ_EXCEPTIONS): Document.
	
*** ../gcc-dist-current/gcc/except.h	Tue Sep 23 21:21:10 2003
--- gcc/except.h	Mon Sep 29 18:55:20 2003
*************** extern tree (*lang_eh_runtime_type) (tre
*** 142,158 ****
     mean that we can use call frame exceptions.  Detect that the target
     has appropriate support.  */
  
! #if ! (defined (EH_RETURN_DATA_REGNO)			\
         && (defined (IA64_UNWIND_INFO)			\
  	   || (DWARF2_UNWIND_INFO			\
  	       && (defined (EH_RETURN_HANDLER_RTX)	\
  		   || defined (HAVE_eh_return)))))
! # define MUST_USE_SJLJ_EXCEPTIONS	1
! #else
! # ifdef IA64_UNWIND_INFO
! #  define MUST_USE_SJLJ_EXCEPTIONS	0
  # else
! #  define MUST_USE_SJLJ_EXCEPTIONS	(DWARF2_UNWIND_INFO == 0)
  # endif
  #endif
  
--- 142,156 ----
     mean that we can use call frame exceptions.  Detect that the target
     has appropriate support.  */
  
! #ifndef MUST_USE_SJLJ_EXCEPTIONS
! # if !(defined (EH_RETURN_DATA_REGNO)			\
         && (defined (IA64_UNWIND_INFO)			\
  	   || (DWARF2_UNWIND_INFO			\
  	       && (defined (EH_RETURN_HANDLER_RTX)	\
  		   || defined (HAVE_eh_return)))))
! #  define MUST_USE_SJLJ_EXCEPTIONS	1
  # else
! #  define MUST_USE_SJLJ_EXCEPTIONS	0
  # endif
  #endif
  
*** ../gcc-dist-current/gcc/doc/tm.texi	Tue Sep 23 20:56:29 2003
--- gcc/doc/tm.texi	Mon Sep 29 21:32:29 2003
*************** If this macro is defined to anything, th
*** 7489,7494 ****
--- 7495,7507 ----
  instead of inline unwinders and @code{__unwind_function} in the non-@code{setjmp} case.
  @end defmac
  
+ @defmac MUST_USE_SJLJ_EXCEPTIONS
+ This macro need only be defined if @code{DWARF2_UNWIND_INFO} is
+ runtime-variable.  In that case, @file{except.h} cannot correctly
+ determine the corresponding definition of
+ @code{MUST_USE_SJLJ_EXCEPTIONS}, so the target must provide it directly.
+ @end defmac
+ 
  @defmac DWARF_CIE_DATA_ALIGNMENT
  This macro need only be defined if the target might save registers in the
  function prologue at an offset to the stack pointer that is not aligned to


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]