diff options
author | pfg <pfg@FreeBSD.org> | 2013-12-18 19:07:29 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2013-12-18 19:07:29 +0000 |
commit | 6f93e9ad10bb17a8b07e0cab16df0097d5ba6090 (patch) | |
tree | 234e9f04b601b7b9c9ff48f56f79bcd379485350 /contrib/gcc/optabs.c | |
parent | a70f2adf579c967cdf8017632ea2266fe2e9eb4a (diff) | |
download | FreeBSD-src-6f93e9ad10bb17a8b07e0cab16df0097d5ba6090.zip FreeBSD-src-6f93e9ad10bb17a8b07e0cab16df0097d5ba6090.tar.gz |
MFC r258428, r258445
gcc: another round of merges from the gcc pre-43 branch.
Bring The following revisions from the gcc43 branch[1]:
118360, 118361, 118363, 118576, 119820,
123906, 125246, and 125721.
They all have in common that the were merged long ago
into Apple's gcc and should help improve the general
quality of the compiler and make it easier to bring
new features from Apple's gcc42.
For details please review the additions to the files:
gcc/ChangeLog.gcc43
gcc/cp/ChangeLog.gcc43 (new, adds previous revisions)
Fix crosscompilation (r258445 by andreast)
Reference:
[1] http://gcc.gnu.org/viewcvs/gcc/trunk/?pathrev=126700
Obtained from: gcc pre4.3 (GPLv2) branch
MFC after: 3 weeks
Diffstat (limited to 'contrib/gcc/optabs.c')
-rw-r--r-- | contrib/gcc/optabs.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/gcc/optabs.c b/contrib/gcc/optabs.c index 539b3ad..3b9a23d 100644 --- a/contrib/gcc/optabs.c +++ b/contrib/gcc/optabs.c @@ -2591,6 +2591,10 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target, goto try_libcall; } + /* We can't widen a bswap. */ + if (unoptab == bswap_optab) + goto try_libcall; + if (CLASS_HAS_WIDER_MODES_P (class)) for (wider_mode = GET_MODE_WIDER_MODE (mode); wider_mode != VOIDmode; @@ -5253,6 +5257,7 @@ init_optabs (void) absv_optab = init_optabv (ABS); addcc_optab = init_optab (UNKNOWN); one_cmpl_optab = init_optab (NOT); + bswap_optab = init_optab (BSWAP); ffs_optab = init_optab (FFS); clz_optab = init_optab (CLZ); ctz_optab = init_optab (CTZ); @@ -5456,6 +5461,11 @@ init_optabs (void) init_interclass_conv_libfuncs (trunc_optab, "trunc", MODE_FLOAT, MODE_DECIMAL_FLOAT); init_interclass_conv_libfuncs (trunc_optab, "trunc", MODE_DECIMAL_FLOAT, MODE_FLOAT); + /* Explicitly initialize the bswap libfuncs since we need them to be + valid for things other than word_mode. */ + set_optab_libfunc (bswap_optab, SImode, "__bswapsi2"); + set_optab_libfunc (bswap_optab, DImode, "__bswapdi2"); + /* Use cabs for double complex abs, since systems generally have cabs. Don't define any libcall for float complex, so that cabs will be used. */ if (complex_double_type_node) |