* mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
arguments.
svn path=/trunk/mono/; revision=32604
2004-08-20 Zoltan Varga <vargaz@freemail.hu>
+ * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
+ arguments.
+
* driver.c: Fix profiling after TLS changes.
* driver.c (mono_main): Set mono_stats.enabled if needed.
guint32
mono_arch_regalloc_cost (MonoCompile *cfg, MonoMethodVar *vmv)
{
+ MonoInst *ins = cfg->varinfo [vmv->idx];
+
if (cfg->method->save_lmf)
/* The register is already saved */
- return 1;
+ /* substract 1 for the invisible store in the prolog */
+ return (ins->opcode == OP_ARG) ? 0 : 1;
else
/* push+pop */
- return 2;
+ return (ins->opcode == OP_ARG) ? 1 : 2;
}
void