From: Christian Würdig Date: Tue, 7 Mar 2006 11:16:43 +0000 (+0000) Subject: removed unused variable X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=587da26e869d303c38f8ec8affddc9eff58dfe92;p=libfirm removed unused variable fixed am scale fixed some minor bugs --- diff --git a/ir/be/ia32/ia32_emitter.c b/ir/be/ia32/ia32_emitter.c index a73c4fe04..943c4b168 100644 --- a/ir/be/ia32/ia32_emitter.c +++ b/ir/be/ia32/ia32_emitter.c @@ -35,6 +35,9 @@ extern int obstack_printf(struct obstack *obst, char *fmt, ...); static const arch_env_t *arch_env = NULL; +/** + * Emits registers and/or address mode of a binary operation. + */ char *ia32_emit_binop(const ir_node *n) { static char *buf = NULL; @@ -67,6 +70,9 @@ char *ia32_emit_binop(const ir_node *n) { return buf; } +/** + * Emits registers and/or address mode of a unary operation. + */ char *ia32_emit_unop(const ir_node *n) { static char *buf = NULL; @@ -91,6 +97,9 @@ char *ia32_emit_unop(const ir_node *n) { return buf; } +/** + * Emits adressmode. + */ char *ia32_emit_am(const ir_node *n) { ia32_am_flavour_t am_flav = get_ia32_am_flavour(n); int had_output = 0; @@ -123,7 +132,7 @@ char *ia32_emit_am(const ir_node *n) { lc_eoprintf(ia32_get_arg_env(), obst, "%2S", n); if (am_flav & ia32_S) { - obstack_printf(obst, "*%d", get_ia32_am_scale(n)); + obstack_printf(obst, "*%d", 1 << get_ia32_am_scale(n)); } had_output = 1; diff --git a/ir/be/ia32/ia32_map_regs.c b/ir/be/ia32/ia32_map_regs.c index 8fcdc26d0..45fa91d56 100644 --- a/ir/be/ia32/ia32_map_regs.c +++ b/ir/be/ia32/ia32_map_regs.c @@ -198,7 +198,6 @@ const arch_register_t *ia32_get_RegParam_reg(int n, ir_mode **modes, long nr, un * requirements dependend on the predecessor. */ long ia32_translate_proj_pos(const ir_node *proj) { - ir_node *first; ir_node *pred = get_Proj_pred(proj); long nr = get_Proj_proj(proj); diff --git a/ir/be/ia32/ia32_new_nodes.h b/ir/be/ia32/ia32_new_nodes.h index 81c37e71d..ecf977eed 100644 --- a/ir/be/ia32/ia32_new_nodes.h +++ b/ir/be/ia32/ia32_new_nodes.h @@ -328,8 +328,8 @@ void alloc_ia32_reg_slots(ir_node *node, int num); /** * Initializes the nodes attributes. */ -void init_ia32_attributes(ir_node *node, int flags, const ia32_register_req_t **in_reqs, - const ia32_register_req_t **out_reqs, int n_res); +void init_ia32_attributes(ir_node *node, int flags, const ia32_register_req_t **in_reqs, \ + const ia32_register_req_t **out_reqs, int n_res); /* Include the generated headers */ #include "gen_ia32_new_nodes.h" diff --git a/ir/be/ia32/ia32_optimize.c b/ir/be/ia32/ia32_optimize.c index e879bb44c..a2ee42c03 100644 --- a/ir/be/ia32/ia32_optimize.c +++ b/ir/be/ia32/ia32_optimize.c @@ -441,7 +441,6 @@ static ir_node *fold_addr(be_abi_irg_t *babi, ir_node *irn, firm_dbg_module_t *m scale = get_tarval_long(get_ia32_Immop_tarval(temp)); if (scale <= 3) { - scale = 1 << scale; index = get_irn_n(temp, 2); DBG((mod, LEVEL_1, "\tgot scaled index %+F\n", index));