aboutsummaryrefslogtreecommitdiff
path: root/libgcc/config/t-softfp
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2014-10-29 12:59:16 +0000
committerJoseph Myers <jsm28@gcc.gnu.org>2014-10-29 12:59:16 +0000
commitbc1b3a8840c2ab808b1085399a7b76e0c9f4103a (patch)
tree91b9b1fdd164936c1a8965d6660a54367fea74d0 /libgcc/config/t-softfp
parentef4bddc299eae13cc25e50eebc523a4963e0a5f7 (diff)
downloadgcc-bc1b3a8840c2ab808b1085399a7b76e0c9f4103a.zip
gcc-bc1b3a8840c2ab808b1085399a7b76e0c9f4103a.tar.gz
gcc-bc1b3a8840c2ab808b1085399a7b76e0c9f4103a.tar.bz2
Optimize powerpc*-*-linux* e500 hardfp/soft-fp use.
Continuing the cleanups of libgcc soft-fp configuration for powerpc*-*-linux* in preparation for implementing TARGET_ATOMIC_ASSIGN_EXPAND_FENV for soft-float and e500, this patch optimizes the choice of which functions to build for the e500 cases. For e500v2, use of hardfp is generally right, except that calls to __unordsf2 and __unorddf2 are actually generated by GCC from __builtin_isunordered and so they need to be implemented with soft-fp to avoid recursively calling themselves. For e500v1, hardfp is right for SFmode (except for __unordsf2) but soft-fp for DFmode (and when using soft-fp, as usual it's best for the conversions between DFmode and integers all to come directly from soft-fp rather than some coming from libgcc2.c). Thus, new variables hardfp_exclusions and softfp_extras are added that configurations using t-hardfp and t-softfp can use to achieve the desired effect of selectively mixing the two sources of functions. Tested with no regressions for crosses to powerpc-linux-gnuspe (both e500v1 and e500v2); also checked that the same set of symbols and versions is exported from shared libgcc before and after the patch. * config/t-hardfp (hardfp_exclusions): Document new variable for user to define. (hardfp_func_list): Exclude functions from $(hardfp_exclusions). * config/t-softfp (softfp_extras): Document new variable for user to define. (softfp_func_list): Add functions from $(softfp_extras). * config/rs6000/t-e500v1-fp, config/rs6000/t-e500v2-fp: New files. * config.host (powerpc*-*-linux*): For e500v1, use rs6000/t-e500v1-fp and t-hardfp; do not use t-softfp-sfdf and t-softfp-excl. For e500v2, use t-hardfp-sfdf, rs6000/t-e500v2-fp and t-hardfp; do not use t-softfp-sfdf and t-softfp-excl. From-SVN: r216835
Diffstat (limited to 'libgcc/config/t-softfp')
-rw-r--r--libgcc/config/t-softfp7
1 files changed, 6 insertions, 1 deletions
diff --git a/libgcc/config/t-softfp b/libgcc/config/t-softfp
index 456fdce..43e0b4d 100644
--- a/libgcc/config/t-softfp
+++ b/libgcc/config/t-softfp
@@ -31,6 +31,10 @@
# is a soft-float mode; for example, sftf where sf is hard-float and
# tf is soft-float.
#
+# If some additional functions should be built that are not implied by
+# the above settings, also define softfp_extras as a list of those
+# functions, e.g. unorddf2.
+#
# If the libgcc2.c functions should not be replaced, also define:
#
# softfp_exclude_libgcc2 := y
@@ -61,7 +65,8 @@ softfp_func_list := \
$(foreach i,$(softfp_int_modes), \
$(softfp_floatint_funcs))) \
$(foreach e,$(softfp_extensions),extend$(e)2) \
- $(foreach t,$(softfp_truncations),trunc$(t)2)
+ $(foreach t,$(softfp_truncations),trunc$(t)2) \
+ $(softfp_extras)
ifeq ($(softfp_exclude_libgcc2),y)
# This list is taken from mklibgcc.in and doesn't presently allow for