diff options
author | Michael Meissner <michael.meissner@amd.com> | 2007-03-24 17:04:47 +0000 |
---|---|---|
committer | Michael Meissner <meissner@gcc.gnu.org> | 2007-03-24 17:04:47 +0000 |
commit | 79b87c74d764bd42703818289685e48996b54eb8 (patch) | |
tree | ec50c8ab7786788a6da7d4f06b0cd93e9555d487 /libgcc | |
parent | cca643862ddb1f61f200b567c667576d39961fb2 (diff) | |
download | gcc-79b87c74d764bd42703818289685e48996b54eb8.zip gcc-79b87c74d764bd42703818289685e48996b54eb8.tar.gz gcc-79b87c74d764bd42703818289685e48996b54eb8.tar.bz2 |
Add BID decimal support
Co-Authored-By: H.J. Lu <hongjiu.lu@intel.com>
Co-Authored-By: Marius Cornea <marius.cornea@intel.com>
From-SVN: r123185
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/ChangeLog | 15 | ||||
-rw-r--r-- | libgcc/Makefile.in | 31 | ||||
-rw-r--r-- | libgcc/configure | 46 | ||||
-rw-r--r-- | libgcc/configure.ac | 36 |
4 files changed, 120 insertions, 8 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 4b42b2c..4271a401 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,18 @@ +2007-03-23 Michael Meissner <michael.meissner@amd.com> + H.J. Lu <hongjiu.lu@intel.com> + + * Makefile.in (enable_decimal_float): New. + (DECNUMINC): Add + -I$(srcdir)/../libdecnumber/$(enable_decimal_float). + (dec-objects): Move decimal32, decimal64 and decimal128 to ... + (decbits-filenames): This. + (decbits-objects): New. + (libgcc-objects): Add $(decbits-objects). + + * configure.ac: Support * --enable-decimal-float={no,yes,bid,dpd}. + Substitute enable_decimal_float. + * configure: Regenerated. + 2007-03-19 Hans-Peter Nilsson <hp@axis.com> * config.host (cris-*-elf | cris-*-none): Set extra_parts. diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in index 63c9512..684c80a 100644 --- a/libgcc/Makefile.in +++ b/libgcc/Makefile.in @@ -37,6 +37,7 @@ SHELL = @SHELL@ enable_shared = @enable_shared@ decimal_float = @decimal_float@ +enable_decimal_float = @enable_decimal_float@ host_noncanonical = @host_noncanonical@ @@ -183,7 +184,13 @@ export slibdir version := $(shell $(CC) -dumpversion) -DECNUMINC = -I$(srcdir)/../libdecnumber -I$(MULTIBUILDTOP)../../libdecnumber +ifeq ($(decimal_float),yes) +DECNUMINC = -I$(srcdir)/../libdecnumber/$(enable_decimal_float) \ + -I$(srcdir)/../libdecnumber \ + -I$(MULTIBUILDTOP)../../libdecnumber +else +DECNUMINC = +endif # Specify the directories to be searched for header files. # Both . and srcdir are used, in that order, @@ -467,22 +474,32 @@ ifneq ($(D32PBIT)$(D64PBIT)$(D128PBIT),) dec-filenames += decContext decNumber decExcept decRound decLibrary decUtility endif +dec-objects = $(patsubst %,%$(objext),$(dec-filenames)) +$(dec-objects): %$(objext): $(srcdir)/../libdecnumber/%.c + $(gcc_compile) -c $< +libgcc-objects += $(dec-objects) + +decbits-filenames = ifneq ($(D32PBIT),) -dec-filenames += decimal32 +decbits-filenames += decimal32 endif ifneq ($(D64PBIT),) -dec-filenames += decimal64 +decbits-filenames += decimal64 endif ifneq ($(D128PBIT),) -dec-filenames += decimal128 +decbits-filenames += decimal128 endif -dec-objects = $(patsubst %,%$(objext),$(dec-filenames)) -$(dec-objects): %$(objext): $(srcdir)/../libdecnumber/%.c +ifeq ($(enable_decimal_float),bid) +decbits-filenames += bid2dpd_dpd2bid +endif + +decbits-objects = $(patsubst %,%$(objext),$(decbits-filenames)) +$(decbits-objects): %$(objext): $(srcdir)/../libdecnumber/$(enable_decimal_float)/%.c $(gcc_compile) -c $< -libgcc-objects += $(dec-objects) +libgcc-objects += $(decbits-objects) # Next build individual support functions. ifneq ($(D32PBIT),) diff --git a/libgcc/configure b/libgcc/configure index b90dfa1..492e976 100644 --- a/libgcc/configure +++ b/libgcc/configure @@ -272,7 +272,7 @@ PACKAGE_STRING='GNU C Runtime Library 1.0' PACKAGE_BUGREPORT='' ac_unique_file="static-object.mk" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libgcc_topdir enable_shared slibdir INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AWK build build_cpu build_vendor build_os host host_cpu host_vendor host_os host_noncanonical build_libsubdir build_subdir host_subdir target_subdir AR ac_ct_AR LIPO ac_ct_LIPO NM ac_ct_NM RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP decimal_float vis_hide tmake_file extra_parts asm_hidden_op LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libgcc_topdir enable_shared slibdir INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AWK build build_cpu build_vendor build_os host host_cpu host_vendor host_os host_noncanonical build_libsubdir build_subdir host_subdir target_subdir AR ac_ct_AR LIPO ac_ct_LIPO NM ac_ct_NM RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP decimal_float enable_decimal_float vis_hide tmake_file extra_parts asm_hidden_op LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -811,6 +811,10 @@ Optional Features: --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-shared don't provide a shared libgcc --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory + --enable-decimal-float={no,yes,bid,dpd} + enable decimal float extension to C. Selecting 'bid' + or 'dpd' choses which decimal floating point format + to use Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -3286,6 +3290,45 @@ echo "${ECHO_T}$libgcc_cv_dfp" >&6 decimal_float=$libgcc_cv_dfp +# Check whether --enable-decimal-float or --disable-decimal-float was given. +if test "${enable_decimal_float+set}" = set; then + enableval="$enable_decimal_float" + + case $enable_decimal_float in + yes | no | bid | dpd) ;; + *) { { echo "$as_me:$LINENO: error: '$enable_decimal_float' is an invalid value for --enable-decimal-float. +Valid choices are 'yes', 'bid', 'dpd', and 'no'." >&5 +echo "$as_me: error: '$enable_decimal_float' is an invalid value for --enable-decimal-float. +Valid choices are 'yes', 'bid', 'dpd', and 'no'." >&2;} + { (exit 1); exit 1; }; } ;; + esac + +else + + case $target in + powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux*) + enable_decimal_float=yes + ;; + *) + enable_decimal_float=no + ;; + esac + +fi; + +# x86's use BID format instead of DPD +if test x$enable_decimal_float = xyes; then + case $target in + i?86*-*-linux* | x86_64*-*-linux*) + enable_decimal_float=bid + ;; + *) + enable_decimal_float=dpd + ;; + esac +fi + + # Collect host-machine-specific information. . ${srcdir}/config.host @@ -4039,6 +4082,7 @@ s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@CPP@,$CPP,;t t s,@decimal_float@,$decimal_float,;t t +s,@enable_decimal_float@,$enable_decimal_float,;t t s,@vis_hide@,$vis_hide,;t t s,@tmake_file@,$tmake_file,;t t s,@extra_parts@,$extra_parts,;t t diff --git a/libgcc/configure.ac b/libgcc/configure.ac index 825805d..2e95e31 100644 --- a/libgcc/configure.ac +++ b/libgcc/configure.ac @@ -107,6 +107,42 @@ AC_CACHE_CHECK([whether decimal floating point is supported], [libgcc_cv_dfp], decimal_float=$libgcc_cv_dfp AC_SUBST(decimal_float) +AC_ARG_ENABLE(decimal-float, +[ --enable-decimal-float={no,yes,bid,dpd} + enable decimal float extension to C. Selecting 'bid' + or 'dpd' choses which decimal floating point format + to use], +[ + case $enable_decimal_float in + yes | no | bid | dpd) ;; + *) AC_MSG_ERROR(['$enable_decimal_float' is an invalid value for --enable-decimal-float. +Valid choices are 'yes', 'bid', 'dpd', and 'no'.]) ;; + esac +], +[ + case $target in + powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux*) + enable_decimal_float=yes + ;; + *) + enable_decimal_float=no + ;; + esac +]) + +# x86's use BID format instead of DPD +if test x$enable_decimal_float = xyes; then + case $target in + i?86*-*-linux* | x86_64*-*-linux*) + enable_decimal_float=bid + ;; + *) + enable_decimal_float=dpd + ;; + esac +fi +AC_SUBST(enable_decimal_float) + # Collect host-machine-specific information. . ${srcdir}/config.host |