Commit 51071bf6 authored by Michael Beck's avatar Michael Beck
Browse files

- BugFix: fixed effect of r22470: Immediate is always the RIGHT operand

  (where this is specified?), so do NOT overwrite it (analog to
  turn_back_am())

[r22485]
parent 0058b497
......@@ -479,8 +479,11 @@ static void fix_am_source(ir_node *irn, void *env)
arch_set_irn_register(cg->arch_env, load_res, out_reg);
/* set the new input operand */
set_irn_n(irn, n_ia32_binary_right, load_res);
if(get_irn_mode(irn) == mode_T) {
if (is_ia32_Immediate(get_irn_n(irn, n_ia32_binary_right)))
set_irn_n(irn, n_ia32_binary_left, load_res);
else
set_irn_n(irn, n_ia32_binary_right, load_res);
if (get_irn_mode(irn) == mode_T) {
const ir_edge_t *edge, *next;
foreach_out_edge_safe(irn, edge, next) {
ir_node *node = get_edge_src_irn(edge);
......
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