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]

[PATCH] (1/3) Add back libgcc-math


This patch adds back libgcc-math populated with vectorized routines
for sin, cos, log, pow, and sqrt for x86_64 as contributed by AMD.

They have signatures like

  v2df __vrd2_log (v2df)
  v4sf __vrs4_powf (v4df, v4df)

and will be used by patch (2/3) that adds vectorization of builtins
to the vectorizer.

libgcc-math is currently enabled by default on x86_64-*-linux* targets.

See also "Notes of the libgcc-math BOF at the summit."
http://gcc.gnu.org/ml/gcc/2006-06/msg00976.html

And past submissions of this part of libgcc-math
http://gcc.gnu.org/ml/gcc-patches/2006-03/msg01611.html


Bootstrapped and tested on x86_64-unknown-linux-gnu.

Ok for mainline?  (I'm quite unsure about adding back pathches - the
toplevel parts were approved at one time and I'm still listed as
maintainer for the at the moment non-existant libgcc-math target library)

Thanks,
Richard.

[Only toplevel parts inline, libgcc-math directory as drop-in tarball
due to size]


2006-11-16  Richard Guenther  <rguenther@suse.de>

	* Makefile.def (target_modules): Add libgcc-math target module.
	* configure.in (target_libraries): Add libgcc-math target library.
	(--enable-libgcc-math): New configure switch.  Enabled by
	default on x86_64-*-linux*.
	* Makefile.in: Regenerate.
	* configure: Regenerate.

	* doc/install.texi: Document --disable-libgcc-math configure
	switch.

Index: Makefile.def
===================================================================
*** Makefile.def	(revision 118884)
--- Makefile.def	(working copy)
*************** host_modules= { module= gnattools; };
*** 118,123 ****
--- 118,124 ----
  target_modules = { module= libstdc++-v3; lib_path=.libs; raw_cxx=true; };
  target_modules = { module= libmudflap; lib_path=.libs; };
  target_modules = { module= libssp; lib_path=.libs; };
+ target_modules = { module= libgcc-math; lib_path=.libs; };
  target_modules = { module= newlib; };
  target_modules = { module= libgfortran; };
  target_modules = { module= libobjc; };
Index: configure.in
===================================================================
*** configure.in	(revision 118884)
--- configure.in	(working copy)
*************** target_libraries="target-libiberty \
*** 147,152 ****
--- 147,153 ----
  		target-libstdc++-v3 \
  		target-libmudflap \
  		target-libssp \
+ 		target-libgcc-math \
  		target-libgfortran \
  		target-boehm-gc \
  		${libgcj} \
*************** AC_ARG_ENABLE(libssp,
*** 312,317 ****
--- 313,333 ----
  ENABLE_LIBSSP=$enableval,
  ENABLE_LIBSSP=yes)
  
+ # Set the default so we build libgcc-math for x86_64-*-linux
+ AC_ARG_ENABLE(libgcc-math,
+ [  --enable-libgcc-math   Builds libgcc-math directory],,
+ [
+ case "${target}" in
+   x86_64-*-linux*)
+     enable_libgcc_math=yes ;;
+   *)
+     enable_libgcc_math=no ;;
+ esac
+ ])
+ if test "${enable_libgcc_math}" != "yes"; then
+   noconfigdirs="$noconfigdirs target-libgcc-math"
+ fi
+ 
  # Save it here so that, even in case of --enable-libgcj, if the Java
  # front-end isn't enabled, we still get libgcj disabled.
  libgcj_saved=$libgcj
Index: gcc/doc/install.texi
===================================================================
*** gcc/doc/install.texi	(revision 118884)
--- gcc/doc/install.texi	(working copy)
*************** should not be built.
*** 1141,1146 ****
--- 1141,1150 ----
  @item --disable-libgomp
  Specify that the run-time libraries used by GOMP should not be built.
  
+ @item --disable-libgcc-math
+ Specify that the run-time libraries for arch and gcc specific math
+ functions should not be built.
+ 
  @item --with-dwarf2
  Specify that the compiler should
  use DWARF 2 debugging information as the default.


2006-11-16  Richard Guenther  <rguenther@suse.de>
        Paolo Bonzini  <bonzini@gnu.org>
	Harsha Jagasia <harsha.jagasia@amd.com>

        * README.vectorized_intrinsics: New file.
        * configure.ac: New file.
        * Makefile.am: Likewise.
        * configure: New generated file.
        * Makefile.in: Likewise.
        * aclocal.m4: Likewise.
        * libtool-version: New file.
        * x86_64/Makefile.am: New file.
        * x86_64/Makefine.in: New generated file.
        * x86_64/mv.map: New file.
        * x86_64/vrd2cos.s: Likewise.
        * x86_64/vrd2exp.s: Likewise.
        * x86_64/vrd2log.s: Likewise.
        * x86_64/vrd2log10.s: Likewise.
        * x86_64/vrd2log2.s: Likewise.
        * x86_64/vrd2sin.s: Likewise.
        * x86_64/vrd4exp.s: Likewise.
        * x86_64/vrd4log.s: Likewise.
        * x86_64/vrs4cosf.s: Likewise.
        * x86_64/vrs4expf.s: Likewise.
        * x86_64/vrs4log10f.s: Likewise.
        * x86_64/vrs4log2f.s: Likewise.
        * x86_64/vrs4logf.s: Likewise.
        * x86_64/vrs4powf.s: Likewise.
        * x86_64/vrs4sinf.s: Likewise.
        * generic/Makefile.am: New file.
        * generic/Makefile.in: New generated file.
        * generic/libm_util_amd.h: New file.
        * generic/remainder_piby2.c: Likewise.
        * generic/remainder_piby2d2f.c: Likewise.

Attachment: libgcc-math.tar.bz2
Description: libgcc-math directory


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