X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Famd64%2Famd64_spec.pl;h=8d81010ed5e5dc088ca17a424b1c4a3b68f32803;hb=ec6929684fd32404d7ba0f0df5498d2230f3abc0;hp=1699581fb4acf25b8e480dc7c66f0a0b4dd30b91;hpb=fecb5663e86ee6a1db64195057ed384514404172;p=libfirm diff --git a/ir/be/amd64/amd64_spec.pl b/ir/be/amd64/amd64_spec.pl index 1699581fb..8d81010ed 100644 --- a/ir/be/amd64/amd64_spec.pl +++ b/ir/be/amd64/amd64_spec.pl @@ -115,7 +115,7 @@ $arch = "amd64"; { name => "r14", type => 2 }, { name => "r15", type => 2 }, # { name => "gp_NOREG", type => 4 }, # we need a dummy register for NoReg nodes - { mode => "mode_Iu" } + { mode => "mode_Lu" } ], # fp => [ # { name => "xmm0", type => 1 }, @@ -142,7 +142,7 @@ $arch = "amd64"; ], ); -$mode_gp = "mode_Iu"; +$mode_gp = "mode_Lu"; $mode_flags = "mode_Iu"; sub amd64_custom_init_attr { @@ -214,15 +214,17 @@ Add => { modified_flags => 1, }, Mul => { - op_flags => "C", - irn_flags => "R", - state => "exc_pinned", - reg_req => { in => [ "gp", "gp" ], - out => [ "gp" ] }, - in => [ "left", "right" ], - outs => [ "res" ], - mode => $mode_gp, - modified_flags => 1, + # we should not rematrialize this node. It produces 2 results and has + # very strict constraints + state => "exc_pinned", + reg_req => { in => [ "rax", "gp" ], + out => [ "rax rdx" ] }, + ins => [ "left", "right" ], + emit => '. mul %S2', + outs => [ "res" ], + mode => $mode_gp, + am => "source,binary", + modified_flags => $status_flags }, Sub => { irn_flags => "R", @@ -314,7 +316,7 @@ Store => { ins => [ "ptr", "val", "mem" ], outs => [ "M" ], mode => "mode_M", - emit => ". mov (%S1), %S2" + emit => ". mov %S2, (%S1)" }, #NoReg_GP => {