+2016-09-22 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
+
+ Backport from 2016-09-22 trunk r240388.
+
+ * config/avr/avr.c (avr_rtx_costs_1): Handle DImode MULT.
+ (avr_address_cost): Replace 61 with MAX_LD_OFFSET(mode).
+
2016-09-21 Segher Boessenkool <segher@kernel.crashing.org>
* doc/rtl.texi (JUMP_LABEL): Document RETURN and SIMPLE_RETURN values.
if (SYMBOL_REF_FLAGS (x) & SYMBOL_FLAG_IO)
{
attr = lookup_attribute ("io", DECL_ATTRIBUTES (decl));
+ if (!attr || !TREE_VALUE (attr))
+ attr = lookup_attribute ("io_low", DECL_ATTRIBUTES (decl));
gcc_assert (attr);
}
if (!attr || !TREE_VALUE (attr))
break;
case SImode:
+ case DImode:
if (AVR_HAVE_MUL)
{
if (!speed)
*total = COSTS_N_INSNS (AVR_HAVE_JMP_CALL ? 5 : 4);
}
- return true;
+ if (mode == DImode)
+ *total *= 2;
+
+ return true;
default:
return false;
&& (REG_P (XEXP (x, 0))
|| GET_CODE (XEXP (x, 0)) == SUBREG))
{
- if (INTVAL (XEXP (x, 1)) >= 61)
+ if (INTVAL (XEXP (x, 1)) > MAX_LD_OFFSET(mode))
cost = 18;
}
else if (CONSTANT_ADDRESS_P (x))