removed unused variable
authorChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Tue, 7 Mar 2006 11:16:43 +0000 (11:16 +0000)
committerChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Tue, 7 Mar 2006 11:16:43 +0000 (11:16 +0000)
fixed am scale
fixed some minor bugs

ir/be/ia32/ia32_emitter.c
ir/be/ia32/ia32_map_regs.c
ir/be/ia32/ia32_new_nodes.h
ir/be/ia32/ia32_optimize.c

index a73c4fe..943c4b1 100644 (file)
@@ -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;
index 8fcdc26..45fa91d 100644 (file)
@@ -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);
 
index 81c37e7..ecf977e 100644 (file)
@@ -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"
index e879bb4..a2ee42c 100644 (file)
@@ -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));