mirror of git://gcc.gnu.org/git/gcc.git
backport: avr.c (avr_rtx_costs_1): Handle DImode MULT.
Backport from 2016-09-22 trunk r240388. 2016-09-22 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com> * config/avr/avr.c (avr_rtx_costs_1): Handle DImode MULT. (avr_address_cost): Replace 61 with MAX_LD_OFFSET(mode). From-SVN: r240397
This commit is contained in:
parent
6b934f5732
commit
02a8e3a0a2
|
|
@ -1,3 +1,10 @@
|
|||
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.
|
||||
|
|
|
|||
|
|
@ -9122,6 +9122,8 @@ avr_eval_addr_attrib (rtx x)
|
|||
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))
|
||||
|
|
@ -10235,6 +10237,7 @@ avr_rtx_costs_1 (rtx x, int codearg, int outer_code ATTRIBUTE_UNUSED,
|
|||
break;
|
||||
|
||||
case SImode:
|
||||
case DImode:
|
||||
if (AVR_HAVE_MUL)
|
||||
{
|
||||
if (!speed)
|
||||
|
|
@ -10260,7 +10263,10 @@ avr_rtx_costs_1 (rtx x, int codearg, int outer_code ATTRIBUTE_UNUSED,
|
|||
*total = COSTS_N_INSNS (AVR_HAVE_JMP_CALL ? 5 : 4);
|
||||
}
|
||||
|
||||
return true;
|
||||
if (mode == DImode)
|
||||
*total *= 2;
|
||||
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
|
|
@ -10837,7 +10843,7 @@ avr_address_cost (rtx x, machine_mode mode ATTRIBUTE_UNUSED,
|
|||
&& (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))
|
||||
|
|
|
|||
Loading…
Reference in New Issue