amd64: added be_Spill and be_Reload transformation.
[libfirm] / ir / be / amd64 / amd64_spec.pl
index 3158e98..8d81010 100644 (file)
@@ -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 => {