diff options
| author | pbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-10-17 01:04:27 +0000 |
|---|---|---|
| committer | pbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-10-17 01:04:27 +0000 |
| commit | bd7a45c47a19a538b45bbc2f79839536bfbb6f75 (patch) | |
| tree | 3599227dbd6a27905516c77e27ab4fb0151e83ba | |
| parent | 463b1e4ef2a03ef52778d66f3963a8825007c9ff (diff) | |
| download | ppe42-gcc-bd7a45c47a19a538b45bbc2f79839536bfbb6f75.tar.gz ppe42-gcc-bd7a45c47a19a538b45bbc2f79839536bfbb6f75.zip | |
2006-10-17 Paul Brook <paul@codesourcery.com>
* config/arm/arm.c (arm_rtx_costs_1): Handle multiply-accumulate.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117809 138bc75d-0d04-0410-961f-82ee72b054a4
| -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 877b768cf57..15b1a70da01 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 ff5831f4325..98b2d6008bb 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)) |

