Commit 843f526a authored by Christoph Mallon's avatar Christoph Mallon Committed by Matthias Braun
Browse files

Use 2-operand IMul instead of (incorrectly specified) Mul on AMD64.

parent 620b3776
......@@ -103,15 +103,13 @@ Add => {
modified_flags => 1,
},
Mul => {
# we should not rematrialize this node. It produces 2 results and has
# very strict constraints
IMul => {
irn_flags => [ "rematerializable" ],
state => "exc_pinned",
reg_req => { in => [ "rax", "gp" ],
out => [ "rax rdx" ] },
reg_req => { in => [ "gp", "gp" ], out => [ "in_r1 !in_r2" ] },
ins => [ "left", "right" ],
emit => 'mul %S1',
outs => [ "res" ],
emit => 'imul %S1, %D0',
mode => $mode_gp,
am => "source,binary",
modified_flags => $status_flags
......
......@@ -136,7 +136,7 @@ static ir_node *gen_Mul(ir_node *node) {
ir_node *new_op1 = be_transform_node(op1);
ir_node *new_op2 = be_transform_node(op2);
ir_node *res = new_bd_amd64_Mul(dbgi, block, new_op1, new_op2);
ir_node *res = new_bd_amd64_IMul(dbgi, block, new_op1, new_op2);
return res;
}
......
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