I'm preparing a patch to turn gcc.target/mips into a torture-like
testsuite. This showed up a fair few problems, the first of which is
fixed below. The code that calculated the size cost of multiplications
was missing a COSTS_N_INSNS call.
Tested on mipsisa64-elf, mips64-elf and mips64-linux-gnu. Applied.
Richard
gcc/
* config/mips/mips.c (mips_rtx_costs): Add missing COSTS_N_INSNS
to the size cost of multiplication.
Index: gcc/config/mips/mips.c
===================================================================
--- gcc/config/mips/mips.c 2012-08-26 11:34:07.000000000 +0100
+++ gcc/config/mips/mips.c 2012-08-26 11:35:15.076810487 +0100
@@ -3841,7 +3841,7 @@ mips_rtx_costs (rtx x, int code, int out
? mips_cost->int_mult_si * 3 + 6
: COSTS_N_INSNS (ISA_HAS_MUL3 ? 7 : 9));
else if (!speed)
- *total = (ISA_HAS_MUL3 ? 1 : 2);
+ *total = COSTS_N_INSNS (ISA_HAS_MUL3 ? 1 : 2);
else if (mode == DImode)
*total = mips_cost->int_mult_di;
else