Factorise creating Conv_I2Is.
[libfirm] / ir / be / ia32 / ia32_spec.pl
index 192ebfe..2d06b0e 100644 (file)
@@ -38,6 +38,7 @@ $arch = "ia32";
 #   hash_func => "name of the hash function for this operation",
 #   latency   => "latency of this operation (can be float)"
 #   attr_type => "name of the attribute struct",
+#   modified_flags =>  [ "CF", ... ] # optional, list of modified flags
 # },
 #
 # ... # (all nodes you need to describe)
@@ -335,7 +336,7 @@ Asm => {
        init_attr => "attr->asm_text = asm_text;\n".
                     "\tattr->register_map = register_map;\n",
        latency   => 10,
-       modified_flags => 1,
+       modified_flags => $status_flags,
 },
 
 # "allocates" a free register
@@ -1472,6 +1473,7 @@ Call => {
        am        => "source,unary",
        units     => [ "BRANCH" ],
        latency   => 4, # random number
+       modified_flags => $status_flags
 },
 
 #-----------------------------------------------------------------------------#
@@ -1800,10 +1802,22 @@ CopyB_i => {
 
 # Conversions
 
+Cwtl => {
+       state     => "exc_pinned",
+       reg_req   => { in => [ "eax" ], out => [ "eax" ] },
+       ins       => [ "val" ],
+       outs      => [ "res" ],
+       emit      => '. cwtl',
+       units     => [ "GP" ],
+       latency   => 1,
+       mode      => $mode_gp,
+},
+
 Conv_I2I => {
        state     => "exc_pinned",
        reg_req   => { in => [ "gp", "gp", "none", "gp" ], out => [ "gp", "none" ] },
        ins       => [ "base", "index", "mem", "val" ],
+       outs      => [ "res", "M" ],
        am        => "source,unary",
        units     => [ "GP" ],
        latency   => 1,