Commit 587da26e authored by Christian Würdig's avatar Christian Würdig
Browse files

removed unused variable

fixed am scale
fixed some minor bugs
parent bdacb3b5
......@@ -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;
......
......@@ -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);
......
......@@ -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"
......
......@@ -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));
......
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