some adjustment to float convs (skip some strictconvs when no_fold_const is not set...
[libfirm] / ir / be / ia32 / ia32_spec.pl
index 2d06b0e..8307d45 100644 (file)
@@ -32,7 +32,7 @@ $arch = "ia32";
 #   ins       => { "in1", "in2" }   # optional, creates n_op_in1, ... consts
 #   mode      => "mode_Iu"          # optional, predefines the mode
 #   emit      => "emit code with templates",
-#   attr      => "attitional attribute arguments for constructor",
+#   attr      => "additional attribute arguments for constructor",
 #   init_attr => "emit attribute initialization template",
 #   rd_constructor => "c source code which constructs an ir_node",
 #   hash_func => "name of the hash function for this operation",
@@ -472,10 +472,10 @@ IMul1OP => {
        irn_flags => "R",
        state     => "exc_pinned",
        reg_req   => { in => [ "gp", "gp", "none", "eax", "gp" ],
-                      out => [ "eax", "edx", "none" ] },
+                      out => [ "eax", "flags", "edx", "none" ] },
        ins       => [ "base", "index", "mem", "left", "right" ],
        emit      => '. imul%M %unop4',
-       outs      => [ "res_low", "res_high", "M" ],
+       outs      => [ "res_low", "flags", "res_high", "M" ],
        am        => "source,binary",
        latency   => 5,
        units     => [ "GP" ],
@@ -583,6 +583,18 @@ Xor => {
        modified_flags => $status_flags
 },
 
+Xor0 => {
+       op_flags  => "c",
+       irn_flags => "R",
+       reg_req   => { out => [ "gp", "flags" ] },
+       outs      => [ "res", "flags" ],
+       emit      => ". xor%M %D0, %D0",
+       units     => [ "GP" ],
+       latency   => 1,
+       mode      => $mode_gp,
+       modified_flags => $status_flags
+},
+
 XorMem => {
        irn_flags => "R",
        state     => "exc_pinned",
@@ -662,6 +674,17 @@ Sbb => {
        modified_flags => $status_flags
 },
 
+Sbb0 => {
+       irn_flags => "R",
+       reg_req   => { in => [ "flags" ], out => [ "gp", "flags" ] },
+       outs      => [ "res", "flags" ],
+       emit      => ". sbb%M %D0, %D0",
+       units     => [ "GP" ],
+       latency   => 1,
+       mode      => $mode_gp,
+       modified_flags => $status_flags
+},
+
 l_Sub => {
        reg_req   => { in => [ "none", "none" ], out => [ "none" ] },
        ins       => [ "minuend", "subtrahend" ],
@@ -706,7 +729,7 @@ Shl => {
                       out => [ "in_r1 !in_r2", "flags" ] },
        ins       => [ "val", "count" ],
        outs      => [ "res", "flags" ],
-       emit      => '. shl %SB1, %S0',
+       emit      => '. shl%M %SB1, %S0',
        units     => [ "GP" ],
        latency   => 1,
        mode      => $mode_gp,
@@ -756,7 +779,7 @@ Shr => {
                       out => [ "in_r1 !in_r2", "flags" ] },
        ins       => [ "val", "count" ],
        outs      => [ "res", "flags" ],
-       emit      => '. shr %SB1, %S0',
+       emit      => '. shr%M %SB1, %S0',
        units     => [ "GP" ],
        mode      => $mode_gp,
        latency   => 1,
@@ -806,7 +829,7 @@ Sar => {
                       out => [ "in_r1 !in_r2", "flags" ] },
        ins       => [ "val", "count" ],
        outs      => [ "res", "flags" ],
-       emit      => '. sar %SB1, %S0',
+       emit      => '. sar%M %SB1, %S0',
        units     => [ "GP" ],
        latency   => 1,
        mode      => $mode_gp,
@@ -837,7 +860,7 @@ Ror => {
                       out => [ "in_r1 !in_r2", "flags" ] },
        ins       => [ "val", "count" ],
        outs      => [ "res", "flags" ],
-       emit      => '. ror %SB1, %S0',
+       emit      => '. ror%M %SB1, %S0',
        units     => [ "GP" ],
        latency   => 1,
        mode      => $mode_gp,
@@ -862,7 +885,7 @@ Rol => {
                       out => [ "in_r1 !in_r2", "flags" ] },
        ins       => [ "val", "count" ],
        outs      => [ "res", "flags" ],
-       emit      => '. rol %SB1, %S0',
+       emit      => '. rol%M %SB1, %S0',
        units     => [ "GP" ],
        latency   => 1,
        mode      => $mode_gp,
@@ -887,7 +910,7 @@ Neg => {
        irn_flags => "R",
        reg_req   => { in => [ "gp" ],
                       out => [ "in_r1", "flags" ] },
-       emit      => '. neg %S0',
+       emit      => '. neg%M %S0',
        ins       => [ "val" ],
        outs      => [ "res", "flags" ],
        units     => [ "GP" ],
@@ -924,7 +947,7 @@ Inc => {
                       out => [ "in_r1", "flags" ] },
        ins       => [ "val" ],
        outs      => [ "res", "flags" ],
-       emit      => '. inc %S0',
+       emit      => '. inc%M %S0',
        units     => [ "GP" ],
        mode      => $mode_gp,
        latency   => 1,
@@ -949,7 +972,7 @@ Dec => {
                       out => [ "in_r1", "flags" ] },
        ins       => [ "val" ],
        outs      => [ "res", "flags" ],
-       emit      => '. dec %S0',
+       emit      => '. dec%M %S0',
        units     => [ "GP" ],
        mode      => $mode_gp,
        latency   => 1,
@@ -974,7 +997,7 @@ Not => {
                       out => [ "in_r1", "flags" ] },
        ins       => [ "val" ],
        outs      => [ "res", "flags" ],
-       emit      => '. not %S0',
+       emit      => '. not%M %S0',
        units     => [ "GP" ],
        latency   => 1,
        mode      => $mode_gp,