+2007-01-10 Paul Brook <paul@codesourcery.com>
+
+ * config/arm/arm.c (arm_rtx_costs_1): Handle mutiply-subtract.
+ * config/arm/arm.md (mulsi3subsi): New insn.
+
2007-01-10 Zdenek Dvorak <dvorakz@suse.cz>
* tree-ssa-loop-manip.c (tree_unroll_loop): Make it a wrapper over ...
? 0 : 4));
case MINUS:
+ if (GET_CODE (XEXP (x, 1)) == MULT && mode == SImode && arm_arch_thumb2)
+ {
+ extra_cost = rtx_cost (XEXP (x, 1), code);
+ if (!REG_OR_SUBREG_REG (XEXP (x, 0)))
+ extra_cost += 4 * ARM_NUM_REGS (mode);
+ return extra_cost;
+ }
+
if (mode == DImode)
return (4 + (REG_OR_SUBREG_REG (XEXP (x, 1)) ? 0 : 8)
+ ((REG_OR_SUBREG_REG (XEXP (x, 0))
(set_attr "insn" "mlas")]
)
+(define_insn "*mulsi3subsi"
+ [(set (match_operand:SI 0 "s_register_operand" "=r")
+ (minus:SI
+ (match_operand:SI 3 "s_register_operand" "r")
+ (mult:SI (match_operand:SI 2 "s_register_operand" "r")
+ (match_operand:SI 1 "s_register_operand" "r"))))]
+ "TARGET_32BIT && arm_arch_thumb2"
+ "mls%?\\t%0, %2, %1, %3"
+ [(set_attr "insn" "mla")
+ (set_attr "predicable" "yes")]
+)
+
;; Unnamed template to match long long multiply-accumulate (smlal)
(define_insn "*mulsidi3adddi"