diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-29 12:59:16 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-29 12:59:16 +0000 |
commit | d9b5cf5c6513fc0a93a5f96418f50d17ffbc2c35 (patch) | |
tree | 91b9b1fdd164936c1a8965d6660a54367fea74d0 /libgcc/config/rs6000 | |
parent | 3754d04677134616a06eabd18d3f4476e5f5ec23 (diff) | |
download | gcc-d9b5cf5c6513fc0a93a5f96418f50d17ffbc2c35.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216835 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc/config/rs6000')
-rw-r--r-- | libgcc/config/rs6000/t-e500v1-fp | 32 | ||||
-rw-r--r-- | libgcc/config/rs6000/t-e500v2-fp | 26 |
2 files changed, 58 insertions, 0 deletions
diff --git a/libgcc/config/rs6000/t-e500v1-fp b/libgcc/config/rs6000/t-e500v1-fp new file mode 100644 index 00000000000..c1f7a0c47bd --- /dev/null +++ b/libgcc/config/rs6000/t-e500v1-fp @@ -0,0 +1,32 @@ +# Copyright (C) 2014 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 3, or (at your option) +# any later version. + +# 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 COPYING3. If not see +# <http://www.gnu.org/licenses/>. + +# Use hardfp.c for SFmode (except __unordsf2), soft-fp for DFmode. +# For SFmode, libgcc2.c functions are used where applicable; for +# DFmode, they are excluded. +hardfp_float_modes := sf +hardfp_int_modes := si +hardfp_extensions := +hardfp_truncations := +hardfp_exclusions := unordsf2 +softfp_float_modes := df +softfp_int_modes := si di +softfp_extensions := sfdf +softfp_truncations := dfsf +softfp_exclude_libgcc2 := n +softfp_extras := unordsf2 diff --git a/libgcc/config/rs6000/t-e500v2-fp b/libgcc/config/rs6000/t-e500v2-fp new file mode 100644 index 00000000000..636b28f0cc8 --- /dev/null +++ b/libgcc/config/rs6000/t-e500v2-fp @@ -0,0 +1,26 @@ +# Copyright (C) 2014 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 3, or (at your option) +# any later version. + +# 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 COPYING3. If not see +# <http://www.gnu.org/licenses/>. + +# All operations except __unordsf2 and __unorddf2 can come from hardfp.c. +hardfp_exclusions := unordsf2 unorddf2 +softfp_float_modes := +softfp_int_modes := +softfp_extensions := +softfp_truncations := +softfp_exclude_libgcc2 := n +softfp_extras := unordsf2 unorddf2 |