From: Michael Beck Date: Fri, 8 Oct 2010 21:28:23 +0000 (+0000) Subject: Allow 64bit Leas (2 shifts and 1 add) X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=c6778d630500a322205f91c224b7076294f75e03;p=libfirm Allow 64bit Leas (2 shifts and 1 add) [r28085] --- diff --git a/ir/be/ia32/ia32_architecture.c b/ir/be/ia32/ia32_architecture.c index 1b0881603..0c00c8983 100644 --- a/ir/be/ia32/ia32_architecture.c +++ b/ir/be/ia32/ia32_architecture.c @@ -464,7 +464,8 @@ int ia32_evaluate_insn(insn_kind kind, const ir_mode *mode, ir_tarval *tv) /* lea is only supported for 32 bit */ if (get_mode_size_bits(mode) <= 32) return arch_costs->lea_cost; - return 0x10000; + /* in 64bit mode, the Lea cost are at wort 2 shifts and one add */ + return 2 * arch_costs->add_cost + 2 * (2 * arch_costs->const_shf_cost); case ADD: case SUB: if (get_mode_size_bits(mode) <= 32)