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

Bugfix: add eax resp. edx proj for MulS if missing

parent 861489e3
......@@ -2851,11 +2851,24 @@ static ir_node *gen_ia32_l_MulS(ia32_transform_env_t *env) {
ir_node *new_op = gen_binop(env, get_binop_left(env->irn), get_binop_right(env->irn), new_rd_ia32_MulS);
ir_node *muls = get_Proj_pred(new_op);
ir_node *proj;
/* MulS cannot have AM for destination */
if (get_ia32_am_support(muls) != ia32_am_None)
set_ia32_am_support(muls, ia32_am_Source);
/* check if EAX and EDX proj exist, add missing one */
proj = get_proj_for_pn(env->irn, pn_ia32_MulS_EAX);
if (! proj) {
proj = new_r_Proj(env->irg, env->block, muls, get_ia32_res_mode(env->irn), pn_ia32_MulS_EAX);
be_new_Keep(&ia32_reg_classes[CLASS_ia32_gp], env->irg, env->block, 1, &proj);
}
proj = get_proj_for_pn(env->irn, pn_ia32_MulS_EDX);
if (! proj) {
proj = new_r_Proj(env->irg, env->block, muls, get_ia32_res_mode(env->irn), pn_ia32_MulS_EDX);
be_new_Keep(&ia32_reg_classes[CLASS_ia32_gp], env->irg, env->block, 1, &proj);
}
return muls;
}
......
Supports Markdown
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