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

fixed Source AM

parent 8b89a7a3
......@@ -396,7 +396,7 @@ char *ia32_emit_binop(const ir_node *n, ia32_emit_env_t *env) {
lc_esnprintf(ia32_get_arg_env(), buf, SNPRINTF_BUF_LEN, "%1D, %s", n, ia32_emit_am(n, env));
}
else {
lc_esnprintf(ia32_get_arg_env(), buf, SNPRINTF_BUF_LEN, "%4S, %s", n, ia32_emit_am(n, env));
lc_esnprintf(ia32_get_arg_env(), buf, SNPRINTF_BUF_LEN, "%3S, %s", n, ia32_emit_am(n, env));
}
}
break;
......
......@@ -1467,14 +1467,19 @@ void ia32_optimize_am(ir_node *irn, void *env) {
if (get_irn_arity(irn) == 5) {
/* binary AMop */
set_irn_n(irn, 4, get_irn_n(left, 2));
/* disconnect from Load */
/* (make second op -> first, set second in to noreg) */
set_irn_n(irn, 2, get_irn_n(irn, 3));
set_irn_n(irn, 3, noreg_gp);
}
else {
/* unary AMop */
set_irn_n(irn, 3, get_irn_n(left, 2));
}
/* disconnect from Load */
set_irn_n(irn, 2, noreg_gp);
/* disconnect from Load */
set_irn_n(irn, 2, noreg_gp);
}
DBG_OPT_AM_S(left, irn);
......
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