Commit 6ee70f81 by Andrew Pinski Committed by Andrew Pinski

aarch64.c (aarch64_register_move_cost): Correct cost of moving from/to the…

aarch64.c (aarch64_register_move_cost): Correct cost of moving from/to the STACK_REG register class.

2014-01-15  Andrew Pinski  <apinski@cavium.com>

	* config/aarch64/aarch64.c (aarch64_register_move_cost): Correct cost
	of moving from/to the STACK_REG register class.

From-SVN: r206649
parent 4d42626f
2014-01-15 Andrew Pinski <apinski@cavium.com>
* config/aarch64/aarch64.c (aarch64_register_move_cost): Correct cost
of moving from/to the STACK_REG register class.
2014-01-15 Richard Henderson <rth@redhat.com> 2014-01-15 Richard Henderson <rth@redhat.com>
PR debug/54694 PR debug/54694
......
...@@ -4870,6 +4870,16 @@ aarch64_register_move_cost (enum machine_mode mode ATTRIBUTE_UNUSED, ...@@ -4870,6 +4870,16 @@ aarch64_register_move_cost (enum machine_mode mode ATTRIBUTE_UNUSED,
const struct cpu_regmove_cost *regmove_cost const struct cpu_regmove_cost *regmove_cost
= aarch64_tune_params->regmove_cost; = aarch64_tune_params->regmove_cost;
/* Moving between GPR and stack cost is the same as GP2GP. */
if ((from == GENERAL_REGS && to == STACK_REG)
|| (to == GENERAL_REGS && from == STACK_REG))
return regmove_cost->GP2GP;
/* To/From the stack register, we move via the gprs. */
if (to == STACK_REG || from == STACK_REG)
return aarch64_register_move_cost (mode, from, GENERAL_REGS)
+ aarch64_register_move_cost (mode, GENERAL_REGS, to);
if (from == GENERAL_REGS && to == GENERAL_REGS) if (from == GENERAL_REGS && to == GENERAL_REGS)
return regmove_cost->GP2GP; return regmove_cost->GP2GP;
else if (from == GENERAL_REGS) else if (from == GENERAL_REGS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment