This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] [4.2 Stage2 Project] Add libgcc-math target library
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 27 Jan 2006 15:37:51 +0100 (CET)
- Subject: [PATCH] [4.2 Stage2 Project] Add libgcc-math target library
This patch (only non-generated and non-imported parts attached due to
size, full patch at http://www.suse.de/~rguenther/libgcc-math-full-1)
adds a new toplevel target library to host gcc and/or target specific
math functions. As a start, it provides SSE2 ABI math intrinsics
conforming to IEEE 754 for ia32 ABI compatible with the ones provided
by the Intel compilers libimf. A followup patch hopefully will add
some vectorized intrinsics for x86_64 so the vectorizer can handle
sin, cos, exp, log and sincos computations on vectors.
The patch has incorporated changes by previous reviews (see thread
starting at http://gcc.gnu.org/ml/gcc-patches/2006-01/msg00991.html).
Bootstrapped on x86_64-unknown-linux-gnu, previously also bootstrapped
and tested on x86_64-unknown-linux-gnu and i686-pc-linux-gnu.
Ok for mainline?
Thanks,
Richard.
:ADDPATCH toplevel:
2006-01-27 Richard Guenther <rguenther@suse.de>
Paolo Bonzini <bonzini@gnu.org>
* Makefile.def (target_modules): Add libgccm target module.
* configure.in (target_libraries): Add libgccm target library.
(--enable-libgccm): New configure switch.
* Makefile.in: Re-generate.
* configure: Re-generate.
* libgcc-math: New toplevel directory.
* doc/install.texi (--disable-libgcc-math): Document.
libgcc-math/
* configure.ac: New file.
* Makefile.am: Likewise.
* configure: New generated file.
* Makefile.in: Likewise.
* aclocal.m4: Likewise.
* libtool-version: Likewise.
* i386: New subdirectory.
* i386/Makefile.am: New file.
* i386/Makefile.in: New generated file.
* i386/sse2.h: Likewise.
* i386/endian.h: Likewise.
* i386/sse2.map: Linker script for SSE2 ABI math intrinsics.
* flt-32/: Import from glibc.
* dbl-64/: Likewise.
Index: Makefile.def
===================================================================
*** Makefile.def (revision 110297)
--- Makefile.def (working copy)
*************** host_modules= { module= gnattools; };
*** 117,122 ****
--- 117,123 ----
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 110297)
--- configure.in (working copy)
*************** target_libraries="target-libiberty \
*** 148,153 ****
--- 148,154 ----
target-libstdc++-v3 \
target-libmudflap \
target-libssp \
+ target-libgcc-math \
target-libgfortran \
${libgcj} \
target-libobjc \
*************** if test "${ENABLE_LIBSSP}" != "yes" ; th
*** 316,321 ****
--- 317,337 ----
noconfigdirs="$noconfigdirs target-libssp"
fi
+ # Set the default so we build libgcc-math for ix86 and x86_64
+ AC_ARG_ENABLE(libgcc-math,
+ [ --enable-libgcc-math Builds libgcc-math directory],,
+ [
+ case "${target}" in
+ i?86-* | x86_64-* )
+ 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 110297)
--- gcc/doc/install.texi (working copy)
*************** do a @samp{make -C gcc gnatlib_and_tools
*** 1086,1091 ****
--- 1086,1095 ----
Specify that the run-time libraries for stack smashing protection
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.
Index: libgcc-math/configure.ac
===================================================================
*** libgcc-math/configure.ac (revision 0)
--- libgcc-math/configure.ac (revision 0)
***************
*** 0 ****
--- 1,147 ----
+ # Process this file with autoconf to produce a configure script, like so:
+ # aclocal && autoconf && autoheader && automake
+
+ AC_PREREQ(2.59)
+ AC_INIT(libgcc-math, 1.0)
+ AC_CONFIG_SRCDIR(configure.ac)
+ AC_CANONICAL_SYSTEM
+
+ AM_INIT_AUTOMAKE
+
+ AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
+ AC_ARG_ENABLE(version-specific-runtime-libs,
+ [ --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory ],
+ [case "$enableval" in
+ yes) version_specific_libs=yes ;;
+ no) version_specific_libs=no ;;
+ *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
+ esac],
+ [version_specific_libs=no])
+ AC_MSG_RESULT($version_specific_libs)
+
+ AM_MAINTAINER_MODE
+ AC_EXEEXT
+
+ AM_ENABLE_MULTILIB(, ..)
+
+ target_alias=${target_alias-$host_alias}
+ AC_SUBST(target_alias)
+
+ AC_LANG_C
+ # The same as in boehm-gc and libstdc++. Have to borrow it from there.
+ # We must force CC to /not/ be precious variables; otherwise
+ # the wrong, non-multilib-adjusted value will be used in multilibs.
+ # As a side effect, we have to subst CFLAGS ourselves.
+
+ m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS])
+ m4_define([_AC_ARG_VAR_PRECIOUS],[])
+ AC_PROG_CC
+ m4_rename([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
+
+ AC_SUBST(CFLAGS)
+
+ if test "x$GCC" != "xyes"; then
+ AC_MSG_ERROR([libgccm must be built with GCC])
+ fi
+ AC_PROG_CPP
+ AM_PROG_AS
+
+ AC_MSG_CHECKING([whether hidden visibility is supported])
+ AC_TRY_COMPILE([
+ void __attribute__((visibility ("hidden"))) bar (void) {}],,
+ [gccm_hidden=yes],[gccm_hidden=no])
+ AC_MSG_RESULT($gccm_hidden)
+ if test x$gccm_hidden = xyes; then
+ AC_DEFINE([HAVE_HIDDEN_VISIBILITY],[1],[__attribute__((visibility ("hidden"))) supported])
+ fi
+
+ AC_MSG_CHECKING([whether symbol versioning is supported])
+ cat > conftest.map <<EOF
+ FOO_1.0 {
+ global: *foo*; bar; local: *;
+ };
+ EOF
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -fPIC -shared -Wl,--version-script,./conftest.map"
+ AC_TRY_LINK([int foo;],[],[gccm_use_symver=yes],[gccm_use_symver=no])
+ LDFLAGS="$save_LDFLAGS"
+ AC_MSG_RESULT($gccm_use_symver)
+ AM_CONDITIONAL(LIBGCCM_USE_SYMVER, [test "x$gccm_use_symver" = xyes])
+
+ AC_MSG_CHECKING([whether we are a 32bit target])
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="-O2"
+ AC_TRY_LINK(,[
+ if (sizeof(int) == 4 && sizeof(long) == 4 && sizeof(void *) == 4)
+ ;
+ else
+ undefined_function ();
+ ],
+ target_ilp32=yes,
+ target_ilp32=no)
+ CFLAGS="$save_CFLAGS"
+ AM_CONDITIONAL(TARGET_ILP32, [test "x$target_ilp32" = xyes])
+
+
+ AM_PROG_LIBTOOL
+ AC_SUBST(enable_shared)
+ AC_SUBST(enable_static)
+
+ # Calculate toolexeclibdir
+ # Also toolexecdir, though it's only used in toolexeclibdir
+ case ${version_specific_libs} in
+ yes)
+ # Need the gcc compiler version to know where to install libraries
+ # and header files if --enable-version-specific-runtime-libs option
+ # is selected.
+ toolexecdir='$(libdir)/gcc/$(target_alias)'
+ toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'
+ ;;
+ no)
+ if test -n "$with_cross_host" &&
+ test x"$with_cross_host" != x"no"; then
+ # Install a library built with a cross compiler in tooldir, not libdir.
+ toolexecdir='$(exec_prefix)/$(target_alias)'
+ toolexeclibdir='$(toolexecdir)/lib'
+ else
+ toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
+ toolexeclibdir='$(libdir)'
+ fi
+ multi_os_directory=`$CC -print-multi-os-directory`
+ case $multi_os_directory in
+ .) ;; # Avoid trailing /.
+ *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
+ esac
+ ;;
+ esac
+ AC_SUBST(toolexecdir)
+ AC_SUBST(toolexeclibdir)
+
+ if test ${multilib} = yes; then
+ multilib_arg="--enable-multilib"
+ else
+ multilib_arg=
+ fi
+
+
+ # Now check which parts we include in the library.
+
+ arch_subdirs=
+ case "${target}" in
+ i?86-* | x86_64-* )
+ # Handle multilib cases
+ if test "x$target_ilp32" = xyes; then
+ arch_subdirs="i386"
+ arch_libraries="i386/libsse2.la"
+ arch_maps="i386/sse2.map"
+ fi ;;
+ *)
+ ;;
+ esac
+ AC_SUBST(arch_subdirs)
+ AC_SUBST(arch_libraries)
+ AC_SUBST(arch_maps)
+
+
+ AC_CONFIG_FILES([Makefile i386/Makefile])
+ AC_OUTPUT
Index: libgcc-math/libtool-version
===================================================================
*** libgcc-math/libtool-version (revision 0)
--- libgcc-math/libtool-version (revision 0)
***************
*** 0 ****
--- 1,6 ----
+ # This file is used to maintain libtool version info for libgcc-math. See
+ # the libtool manual to understand the meaning of the fields. This is
+ # a separate file so that version updates don't involve re-running
+ # automake.
+ # CURRENT:REVISION:AGE
+ 0:0:0
Index: libgcc-math/Makefile.am
===================================================================
*** libgcc-math/Makefile.am (revision 0)
--- libgcc-math/Makefile.am (revision 0)
***************
*** 0 ****
--- 1,86 ----
+ ## Makefile for the toplevel directory of the libgccm library.
+ ##
+ ## Copyright (C) 2005
+ ## Free Software Foundation, Inc.
+ ##
+
+ AUTOMAKE_OPTIONS = 1.9.5 foreign
+ ACLOCAL_AMFLAGS = -I .. -I ../config
+ MAINT_CHARSET = latin1
+
+ SUBDIRS = @arch_subdirs@
+
+ # May be used by various substitution variables.
+ gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+
+ if LIBGCCM_USE_SYMVER
+ version_arg = -Wl,--version-script=gccm.map
+ version_dep = gccm.map
+ .PHONY: gccm.map
+ gccm.map:
+ rm -f gccm.map
+ for map in @arch_maps@; do \
+ cat $(srcdir)/$$map >> gccm.map; \
+ done
+ else
+ version_arg =
+ version_dep =
+ endif
+
+
+ toolexeclib_LTLIBRARIES = libgcc-math.la
+
+ libgcc_math_la_SOURCES =
+ libgcc_math_la_LIBADD = @arch_libraries@
+ libgcc_math_la_DEPENDENCIES = $(libgcc_math_la_LIBADD) $(version_dep)
+ libgcc_math_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
+ $(version_arg) -lm
+
+
+ # XXX hack alert
+ # From libffi/Makefile.am
+
+ # Work around what appears to be a GNU make bug handling MAKEFLAGS
+ # values defined in terms of make variables, as is the case for CC and
+ # friends when we are called from the top level Makefile.
+ AM_MAKEFLAGS = \
+ "AR_FLAGS=$(AR_FLAGS)" \
+ "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
+ "CFLAGS=$(CFLAGS)" \
+ "CXXFLAGS=$(CXXFLAGS)" \
+ "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
+ "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
+ "INSTALL=$(INSTALL)" \
+ "INSTALL_DATA=$(INSTALL_DATA)" \
+ "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
+ "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
+ "JC1FLAGS=$(JC1FLAGS)" \
+ "LDFLAGS=$(LDFLAGS)" \
+ "LIBCFLAGS=$(LIBCFLAGS)" \
+ "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
+ "MAKE=$(MAKE)" \
+ "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
+ "PICFLAG=$(PICFLAG)" \
+ "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
+ "SHELL=$(SHELL)" \
+ "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
+ "exec_prefix=$(exec_prefix)" \
+ "infodir=$(infodir)" \
+ "libdir=$(libdir)" \
+ "prefix=$(prefix)" \
+ "includedir=$(includedir)" \
+ "AR=$(AR)" \
+ "AS=$(AS)" \
+ "CC=$(CC)" \
+ "CXX=$(CXX)" \
+ "LD=$(LD)" \
+ "LIBCFLAGS=$(LIBCFLAGS)" \
+ "NM=$(NM)" \
+ "PICFLAG=$(PICFLAG)" \
+ "RANLIB=$(RANLIB)" \
+ "DESTDIR=$(DESTDIR)"
+
+ MAKEOVERRIDES=
+
+ ## ################################################################
+
Index: libgcc-math/i386/Makefile.am
===================================================================
*** libgcc-math/i386/Makefile.am (revision 0)
--- libgcc-math/i386/Makefile.am (revision 0)
***************
*** 0 ****
--- 1,117 ----
+ ## Makefile for the i386 directory of the libgccm library.
+ ##
+ ## Copyright (C) 2006
+ ## Free Software Foundation, Inc.
+ ##
+
+ # May be used by various substitution variables.
+ gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+
+
+ noinst_LTLIBRARIES = libsse2.la
+
+ libsse2_la_CFLAGS = -I@srcdir@/../include -include @srcdir@/sse2.h \
+ -Wall -O2 -g -msse2 -msseregparm -mfpmath=sse -march=pentium3 \
+ -fno-math-errno -fno-trapping-math -ffinite-math-only \
+ -fno-rounding-math -fno-signaling-nans -D__NO_MATH_INLINES
+
+ libsse2_la_SOURCES = \
+ @srcdir@/../flt-32/e_acosf.c \
+ @srcdir@/../flt-32/e_asinf.c \
+ @srcdir@/../flt-32/e_atan2f.c \
+ @srcdir@/../flt-32/s_atanf.c \
+ @srcdir@/../flt-32/s_cosf.c \
+ @srcdir@/../flt-32/e_expf.c \
+ @srcdir@/../flt-32/e_log10f.c \
+ @srcdir@/../flt-32/e_logf.c \
+ @srcdir@/../flt-32/e_powf.c \
+ @srcdir@/../flt-32/s_sinf.c \
+ @srcdir@/../flt-32/s_tanf.c \
+ @srcdir@/../flt-32/k_cosf.c \
+ @srcdir@/../flt-32/k_rem_pio2f.c \
+ @srcdir@/../flt-32/k_sinf.c \
+ @srcdir@/../flt-32/k_tanf.c \
+ @srcdir@/../flt-32/e_rem_pio2f.c \
+ @srcdir@/../flt-32/e_sqrtf.c \
+ @srcdir@/../flt-32/s_scalbnf.c \
+ @srcdir@/../flt-32/s_floorf.c \
+ @srcdir@/../flt-32/s_isinff.c \
+ @srcdir@/../dbl-64/t_exp.c \
+ @srcdir@/../dbl-64/e_asin.c \
+ @srcdir@/../dbl-64/e_atan2.c \
+ @srcdir@/../dbl-64/s_atan.c \
+ @srcdir@/../dbl-64/branred.c \
+ @srcdir@/../dbl-64/doasin.c \
+ @srcdir@/../dbl-64/dosincos.c \
+ @srcdir@/../dbl-64/e_exp.c \
+ @srcdir@/../dbl-64/halfulp.c \
+ @srcdir@/../dbl-64/k_rem_pio2.c \
+ @srcdir@/../dbl-64/e_log10.c \
+ @srcdir@/../dbl-64/e_log.c \
+ @srcdir@/../dbl-64/mpa.c \
+ @srcdir@/../dbl-64/mpatan2.c \
+ @srcdir@/../dbl-64/mpatan.c \
+ @srcdir@/../dbl-64/mpexp.c \
+ @srcdir@/../dbl-64/mplog.c \
+ @srcdir@/../dbl-64/mpsqrt.c \
+ @srcdir@/../dbl-64/mptan.c \
+ @srcdir@/../dbl-64/e_pow.c \
+ @srcdir@/../dbl-64/e_rem_pio2.c \
+ @srcdir@/../dbl-64/s_sin.c \
+ @srcdir@/../dbl-64/sincos32.c \
+ @srcdir@/../dbl-64/slowexp.c \
+ @srcdir@/../dbl-64/slowpow.c \
+ @srcdir@/../dbl-64/e_sqrt.c \
+ @srcdir@/../dbl-64/s_tan.c \
+ @srcdir@/../dbl-64/s_scalbn.c \
+ @srcdir@/../dbl-64/s_floor.c \
+ @srcdir@/../dbl-64/s_isinf.c
+
+
+ # XXX hack alert
+ # From libffi/Makefile.am
+
+ # Work around what appears to be a GNU make bug handling MAKEFLAGS
+ # values defined in terms of make variables, as is the case for CC and
+ # friends when we are called from the top level Makefile.
+ AM_MAKEFLAGS = \
+ "AR_FLAGS=$(AR_FLAGS)" \
+ "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
+ "CFLAGS=$(CFLAGS)" \
+ "CXXFLAGS=$(CXXFLAGS)" \
+ "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
+ "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
+ "INSTALL=$(INSTALL)" \
+ "INSTALL_DATA=$(INSTALL_DATA)" \
+ "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
+ "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
+ "JC1FLAGS=$(JC1FLAGS)" \
+ "LDFLAGS=$(LDFLAGS)" \
+ "LIBCFLAGS=$(LIBCFLAGS)" \
+ "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
+ "MAKE=$(MAKE)" \
+ "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
+ "PICFLAG=$(PICFLAG)" \
+ "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
+ "SHELL=$(SHELL)" \
+ "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
+ "exec_prefix=$(exec_prefix)" \
+ "infodir=$(infodir)" \
+ "libdir=$(libdir)" \
+ "prefix=$(prefix)" \
+ "includedir=$(includedir)" \
+ "AR=$(AR)" \
+ "AS=$(AS)" \
+ "CC=$(CC)" \
+ "CXX=$(CXX)" \
+ "LD=$(LD)" \
+ "LIBCFLAGS=$(LIBCFLAGS)" \
+ "NM=$(NM)" \
+ "PICFLAG=$(PICFLAG)" \
+ "RANLIB=$(RANLIB)" \
+ "DESTDIR=$(DESTDIR)"
+
+ MAKEOVERRIDES=
+
+ ## ################################################################
+
Index: libgcc-math/i386/sse2.h
===================================================================
*** libgcc-math/i386/sse2.h (revision 0)
--- libgcc-math/i386/sse2.h (revision 0)
***************
*** 0 ****
--- 1,94 ----
+ /* This re-writes the math routines in flt-32 and dbl-64 to have their
+ exported symbols prefix with __libm_sse2 for an SSE2 ABI implementation.
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
+ This file is part of GCC.
+
+ GCC is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 2, or (at your option) any later
+ version.
+
+ In addition to the permissions in the GNU General Public License, the
+ Free Software Foundation gives you unlimited permission to link the
+ compiled version of this file into combinations with other programs,
+ and to distribute those combinations without any restriction coming
+ from the use of this file. (The General Public License restrictions
+ do apply in other respects; for example, they cover modification of
+ the file, and distribution when not linked into a combine
+ executable.)
+
+ GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+ #include "libc-symbols.h"
+
+ #undef weak_alias
+ #undef strong_alias
+ #undef hidden_def
+ #define weak_alias(a,b)
+ #define strong_alias(a,b)
+ #define hidden_def(a)
+
+ /* s_atanf.c */
+ #define __atanf __libm_sse2_atanf
+
+ /* e_asinf.c */
+ #define __ieee754_acosf __libm_sse2_acosf
+ #define __ieee754_asinf __libm_sse2_asinf
+
+ /* e_atan2f.c */
+ #define __ieee754_atan2f __libm_sse2_atan2f
+ #define __ieee754_expf __libm_sse2_expf
+
+ /* e_log10f.c */
+ #define __ieee754_log10f __libm_sse2_log10f
+
+ /* e_logf.c */
+ #define __ieee754_logf __libm_sse2_logf
+
+ /* e_powf.c */
+ #define __ieee754_powf __libm_sse2_powf
+
+ /* s_sinf.c */
+ #define __sinf __libm_sse2_sinf
+ #define __cosf __libm_sse2_cosf
+
+ /* s_tanf.c */
+ #define __tanf __libm_sse2_tanf
+
+ /* s_atan.c */
+ #define atan __libm_sse2_atan
+
+ /* e_asin.c */
+ #define __ieee754_acos __libm_sse2_acos
+ #define __ieee754_asin __libm_sse2_asin
+
+ /* e_atan2.c */
+ #define __ieee754_atan2 __libm_sse2_atan2
+
+ /* e_exp.c */
+ #define __ieee754_exp __libm_sse2_exp
+
+ /* e_log10.c */
+ #define __ieee754_log10 __libm_sse2_log10
+
+ /* e_log.c */
+ #define __ieee754_log __libm_sse2_log
+
+ /* e_pow.c */
+ #define __ieee754_pow __libm_sse2_pow
+
+ /* s_sin.c */
+ #define __cos __libm_sse2_cos
+ #define __sin __libm_sse2_sin
+
+ /* s_tan.c */
+ #define tan __libm_sse2_tan
Index: libgcc-math/i386/endian.h
===================================================================
*** libgcc-math/i386/endian.h (revision 0)
--- libgcc-math/i386/endian.h (revision 0)
***************
*** 0 ****
--- 1,57 ----
+ /* endian.h file crafted from relevant parts of libc include/endian.h
+ string/endian.h and arch-specific bits/endian.h.
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
+ This file is part of GCC.
+
+ GCC is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 2, or (at your option) any later
+ version.
+
+ In addition to the permissions in the GNU General Public License, the
+ Free Software Foundation gives you unlimited permission to link the
+ compiled version of this file into combinations with other programs,
+ and to distribute those combinations without any restriction coming
+ from the use of this file. (The General Public License restrictions
+ do apply in other respects; for example, they cover modification of
+ the file, and distribution when not linked into a combine
+ executable.)
+
+ GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+ #ifndef LIBGCCM_ENDIAN_H
+ #define LIBGCCM_ENDIAN_H
+
+ #define __BIG_ENDIAN 4321
+ #define __LITTLE_ENDIAN 1234
+ #define BIG_ENDIAN 4321
+ #define LITTLE_ENDIAN 1234
+
+ /* Change this. */
+ #define __FLOAT_WORD_ORDER 1234
+ #define __BYTE_ORDER 1234
+
+ #if __FLOAT_WORD_ORDER == BIG_ENDIAN
+ # define BIG_ENDI 1
+ # undef LITTLE_ENDI
+ # define HIGH_HALF 0
+ # define LOW_HALF 1
+ #else
+ # if __FLOAT_WORD_ORDER == LITTLE_ENDIAN
+ # undef BIG_ENDI
+ # define LITTLE_ENDI 1
+ # define HIGH_HALF 1
+ # define LOW_HALF 0
+ # endif
+ #endif
+
+ #endif
Index: libgcc-math/i386/sse2.map
===================================================================
*** libgcc-math/i386/sse2.map (revision 0)
--- libgcc-math/i386/sse2.map (revision 0)
***************
*** 0 ****
--- 1,11 ----
+ LIBGCCM_1.0 {
+ global:
+ __libm_sse2_acos; __libm_sse2_asin; __libm_sse2_atan2; __libm_sse2_atan;
+ __libm_sse2_exp; __libm_sse2_log; __libm_sse2_log10; __libm_sse2_log;
+ __libm_sse2_pow; __libm_sse2_cos; __libm_sse2_sin; __libm_sse2_tan;
+ __libm_sse2_acosf; __libm_sse2_asinf; __libm_sse2_atan2f;
+ __libm_sse2_atanf; __libm_sse2_cosf; __libm_sse2_expf; __libm_sse2_log10f;
+ __libm_sse2_logf; __libm_sse2_powf; __libm_sse2_sinf; __libm_sse2_tanf;
+ local:
+ *;
+ };