aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/arm
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2006-10-17 01:04:27 +0000
committerPaul Brook <pbrook@gcc.gnu.org>2006-10-17 01:04:27 +0000
commit26da58ddfaccabb2243f08d10c390e7f1f452873 (patch)
tree3599227dbd6a27905516c77e27ab4fb0151e83ba /gcc/config/arm
parentb5d713b9b0ef38d9fca6553adf5d7d31b972b1a0 (diff)
downloadgcc-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
Diffstat (limited to 'gcc/config/arm')
-rw-r--r--gcc/config/arm/arm.c8
1 files changed, 8 insertions, 0 deletions
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))