Commit a76b1892 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Use new_*_Const(irg, get_mode_$VAL(mode)) instead of new_*_Const_long(irg, mode, $VAL).

parent 928a8792
......@@ -2057,14 +2057,14 @@ static ir_node *ia32_create_trampoline_fkt(ir_node *block, ir_node *mem, ir_node
/* mov ecx,<env> */
st = new_r_Store(block, mem, p, new_r_Const_long(irg, mode_Bu, 0xb9), cons_none);
mem = new_r_Proj(st, mode_M, pn_Store_M);
p = new_r_Add(block, p, new_r_Const_long(irg, mode_Iu, 1), mode);
p = new_r_Add(block, p, new_r_Const(irg, get_mode_one(mode_Iu)), mode);
st = new_r_Store(block, mem, p, env, cons_none);
mem = new_r_Proj(st, mode_M, pn_Store_M);
p = new_r_Add(block, p, new_r_Const_long(irg, mode_Iu, 4), mode);
/* jmp <callee> */
st = new_r_Store(block, mem, p, new_r_Const_long(irg, mode_Bu, 0xe9), cons_none);
mem = new_r_Proj(st, mode_M, pn_Store_M);
p = new_r_Add(block, p, new_r_Const_long(irg, mode_Iu, 1), mode);
p = new_r_Add(block, p, new_r_Const(irg, get_mode_one(mode_Iu)), mode);
st = new_r_Store(block, mem, p, callee, cons_none);
mem = new_r_Proj(st, mode_M, pn_Store_M);
p = new_r_Add(block, p, new_r_Const_long(irg, mode_Iu, 4), mode);
......
......@@ -267,7 +267,7 @@ static void instrument_block(ir_node *bb, ir_node *address, unsigned int id)
load = new_r_Load(bb, unknown, offset, mode_Iu, cons_none);
projm = new_r_Proj(load, mode_M, pn_Load_M);
proji = new_r_Proj(load, mode_Iu, pn_Load_res);
cnst = new_r_Const_long(irg, mode_Iu, 1);
cnst = new_r_Const(irg, get_mode_one(mode_Iu));
add = new_r_Add(bb, proji, cnst, mode_Iu);
store = new_r_Store(bb, projm, offset, add, cons_none);
projm = new_r_Proj(store, mode_M, pn_Store_M);
......
......@@ -1283,7 +1283,7 @@ static void lower_Cond(ir_node *node, ir_mode *high_mode)
ir_node *xor_low = new_rd_Eor(dbg, block, low_left, low_right, mode);
ir_node *xor_high = new_rd_Eor(dbg, block, high_left, high_right, mode);
ir_node *ornode = new_rd_Or(dbg, block, xor_low, xor_high, mode);
ir_node *cmp = new_rd_Cmp(dbg, block, ornode, new_r_Const_long(irg, mode, 0), relation);
ir_node *cmp = new_rd_Cmp(dbg, block, ornode, new_r_Const(irg, get_mode_null(mode)), relation);
set_Cond_selector(node, cmp);
return;
}
......@@ -1548,7 +1548,7 @@ static void lower_Cmp(ir_node *cmp, ir_mode *m)
ir_node *xor_low = new_rd_Eor(dbg, block, low_left, low_right, mode);
ir_node *xor_high = new_rd_Eor(dbg, block, high_left, high_right, mode);
ir_node *ornode = new_rd_Or(dbg, block, xor_low, xor_high, mode);
ir_node *new_cmp = new_rd_Cmp(dbg, block, ornode, new_r_Const_long(irg, mode, 0), relation);
ir_node *new_cmp = new_rd_Cmp(dbg, block, ornode, new_r_Const(irg, get_mode_null(mode)), relation);
exchange(cmp, new_cmp);
return;
}
......
......@@ -485,7 +485,7 @@ static void lower_Cmp(ir_node *n)
ir_mode *op_mode = get_irn_mode(left);
ir_node *right = get_Cmp_right(n);
ir_node *symconst2 = NULL;
ir_node *zero = new_rd_Const_long(dbgi, irg, mode_Is, 0);
ir_node *zero = new_rd_Const(dbgi, irg, get_mode_null(mode_Is));
if (! mode_is_float(op_mode))
return;
......
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