diff options
author | Paul Brook <paul@codesourcery.com> | 2006-10-17 01:04:27 +0000 |
---|---|---|
committer | Paul Brook <pbrook@gcc.gnu.org> | 2006-10-17 01:04:27 +0000 |
commit | 26da58ddfaccabb2243f08d10c390e7f1f452873 (patch) | |
tree | 3599227dbd6a27905516c77e27ab4fb0151e83ba | |
parent | b5d713b9b0ef38d9fca6553adf5d7d31b972b1a0 (diff) | |
download | gcc-26da58ddfaccabb2243f08d10c390e7f1f452873.zip gcc-26da58ddfaccabb2243f08d10c390e7f1f452873.tar.gz gcc-26da58ddfaccabb2243f08d10c390e7f1f452873.tar.bz2 |
arm.c (arm_rtx_costs_1): Handle multiply-accumulate.
2006-10-17 Paul Brook <paul@codesourcery.com>
* config/arm/arm.c (arm_rtx_costs_1): Handle multiply-accumulate.
From-SVN: r117809
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/config/arm/arm.c | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 877b768..15b1a70 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2006-10-17 Paul Brook <paul@codesourcery.com> + + * config/arm/arm.c (arm_rtx_costs_1): Handle multiply-accumulate. + 2006-10-16 Brooks Moses <bmoses@stanford.edu> * doc/contrib.texi, doc/install.texi, doc/standards.texi: diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index ff5831f..98b2d60 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -4465,6 +4465,14 @@ arm_rtx_costs_1 (rtx x, enum rtx_code code, enum rtx_code outer) /* Fall through */ case PLUS: + if (GET_CODE (XEXP (x, 0)) == MULT) + { + extra_cost = rtx_cost (XEXP (x, 0), code); + if (!REG_OR_SUBREG_REG (XEXP (x, 1))) + extra_cost += 4 * ARM_NUM_REGS (mode); + return extra_cost; + } + if (GET_MODE_CLASS (mode) == MODE_FLOAT) return (2 + (REG_OR_SUBREG_REG (XEXP (x, 0)) ? 0 : 8) + ((REG_OR_SUBREG_REG (XEXP (x, 1)) |