This is the mail archive of the gcc@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]

Non-call exceptions and libcalls Part 2


Richard Henderson writes:
 > On Tue, Jun 19, 2001 at 05:13:18PM +0100, Andrew Haley wrote:
 > > 	* optabs.c (emit_libcall_block): When using non-call exceptions,
 > > 	don't mark libcalls never throwing.  */
 > 
 > Ok.

This is, in a sense, the second part of this patch.  Having allowed
libcalls to throw, we need to compile the appropriate ones with
-fnon-call-exceptions.

This is a fairly minimal subset of functions to compile with unwinder
info: it might just make more sense to compile all of libgcc2 that way
rather than just the divide functions.

Andrew.

2001-07-05  Andrew Haley  <aph@cambridge.redhat.com>

	* Makefile.in (LIB2_DIVMOD_FUNCS): New.
	(LIB2FUNCS): Move divmod functions to LIB2_DIVMOD_FUNCS.
	* mklibgcc.in: Compile LIB2_DIVMOD_FUNCS.

Index: gcc/Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.687
diff -c -2 -p -r1.687 Makefile.in
*** Makefile.in	2001/07/03 06:22:01	1.687
--- Makefile.in	2001/07/05 13:35:36
*************** 
*** 781,794 ****
  
  # Library members defined in libgcc2.c.
! LIB2FUNCS = _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
!      _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 _clz \
!     _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \
!     _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
!     _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi \
!     _fixtfdi _fixunstfdi _floatditf \
      _clear_cache _trampoline __main _exit \
      _absvsi2 _absvdi2 _addvsi3 _addvdi3 _subvsi3 _subvdi3 \
!     _mulvsi3 _mulvdi3 _negvsi2 _negvdi2 \
!     _ctors
  
  # Defined in libgcc2.c, included only in the static library.
--- 781,792 ----
  
  # Library members defined in libgcc2.c.
! LIB2FUNCS = _muldi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 _clz \
!     _cmpdi2 _ucmpdi2 _floatdidf _floatdisf _fixunsdfsi _fixunssfsi \
!     _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
!     _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi _fixtfdi _fixunstfdi \
!     _floatditf \
      _clear_cache _trampoline __main _exit \
      _absvsi2 _absvdi2 _addvsi3 _addvdi3 _subvsi3 _subvdi3 \
!     _mulvsi3 _mulvdi3 _negvsi2 _negvdi2 _ctors
  
  # Defined in libgcc2.c, included only in the static library.
***************
*** 805,808 ****
--- 803,810 ----
      _df_to_sf _thenan_df _df_to_usi _usi_to_df
  
+ # These might cause a divide overflow trap and so are compiled with
+ # unwinder info.
+ LIB2_DIVMOD_FUNCS = _divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4
+ 
  #
  # Language makefile fragments.
***************
*** 1009,1012 ****
--- 1011,1015 ----
  	FPBIT='$(FPBIT)' \
  	FPBIT_FUNCS='$(FPBIT_FUNCS)' \
+ 	LIB2_DIVMOD_FUNCS='$(LIB2_DIVMOD_FUNCS)' \
  	DPBIT='$(DPBIT)' \
  	DPBIT_FUNCS='$(DPBIT_FUNCS)' \
Index: gcc/mklibgcc.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/mklibgcc.in,v
retrieving revision 1.28
diff -c -2 -p -r1.28 mklibgcc.in
*** mklibgcc.in	2001/05/17 03:15:43	1.28
--- mklibgcc.in	2001/07/05 13:35:43
***************
*** 18,21 ****
--- 18,22 ----
  # FPBIT
  # FPBIT_FUNCS
+ # LIB2_DIVMOD_FUNCS
  # DPBIT
  # DPBIT_FUNCS
***************
*** 119,122 ****
--- 120,136 ----
    done
    libgcc2_st_objs="$libgcc2_st_objs ${name}${objext}"
+ done
+ 
+ for name in $LIB2_DIVMOD_FUNCS; do
+   for ml in $MULTILIBS; do
+     dir=`echo ${ml} | sed -e 's/;.*$//' -e 's/=/$(EQ)/g'`
+     flags=`echo ${ml} | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`;
+     out="libgcc/${dir}/${name}${objext}"
+ 
+     echo $out: $libgcc2_c_dep
+     echo "	$gcc_compile" '$(MAYBE_USE_COLLECT2)' $flags -DL$name \
+       -c '$(srcdir)/libgcc2.c' -fexceptions -fnon-call-exceptions -o $out
+   done
+   libgcc2_objs="$libgcc2_objs ${name}${objext}"
  done
  


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