ad-hoc fix for lfoat compares (this is not mallons optimal solution yet)
[libfirm] / ir / be / ia32 / ia32_spec.pl
index fb06c51..99991fc 100644 (file)
@@ -794,21 +794,6 @@ TestJmp => {
        units     => [ "BRANCH" ],
 },
 
-CJmpAM => {
-       state     => "pinned",
-       op_flags  => "L|X|Y",
-       reg_req   => { in => [ "gp", "gp", "gp", "gp", "none" ], out => [ "none", "none" ] },
-       outs      => [ "false", "true" ],
-       units     => [ "BRANCH" ],
-},
-
-CJmp => {
-       state     => "pinned",
-       op_flags  => "L|X|Y",
-       reg_req   => { in => [ "gp", "gp" ] },
-       units     => [ "BRANCH" ],
-},
-
 SwitchJmp => {
        state     => "pinned",
        op_flags  => "L|X|Y",
@@ -939,9 +924,10 @@ Load => {
        op_flags  => "L|F",
        state     => "exc_pinned",
        reg_req   => { in => [ "gp", "gp", "none" ], out => [ "gp", "none" ] },
+       ins       => [ "base", "index", "mem" ],
+       outs      => [ "res", "M" ],
        latency   => 0,
        emit      => ". mov%SE%ME%.l %AM, %D0",
-       outs      => [ "res", "M" ],
        units     => [ "GP" ],
 },
 
@@ -964,6 +950,7 @@ Store => {
        op_flags  => "L|F",
        state     => "exc_pinned",
        reg_req   => { in => [ "gp", "gp", "gp", "none" ], out => [ "none" ] },
+       ins       => [ "base", "index", "val", "mem" ],
        emit      => '. mov%M %binop',
        latency   => 2,
        units     => [ "GP" ],
@@ -982,7 +969,7 @@ Store8Bit => {
 
 Lea => {
        irn_flags => "R",
-       reg_req   => { in => [ "gp", "gp" ], out => [ "in_r1" ] },
+       reg_req   => { in => [ "gp", "gp" ], out => [ "gp" ] },
        emit      => '. leal %AM, %D0',
        latency   => 2,
        units     => [ "GP" ],
@@ -1344,8 +1331,19 @@ Conv_FP2FP => {
 
 CmpCMov => {
        irn_flags => "R",
-       reg_req   => { in => [ "gp", "gp", "gp", "gp" ], out => [ "in_r4" ] },
-       ins       => [ "cmp_left", "cmp_right", "val_true", "val_false" ],
+       reg_req   => { in => [ "gp", "gp", "gp", "gp", "none", "gp", "gp" ], out => [ "in_r7" ] },
+       ins       => [ "base", "index", "cmp_left", "cmp_right", "mem", "val_true", "val_false" ],
+       attr      => "pn_Cmp pn_code",
+       init_attr => "attr->pn_code = pn_code;",
+       latency   => 2,
+       units     => [ "GP" ],
+       mode      => $mode_gp,
+},
+
+TestCMov => {
+       irn_flags => "R",
+       reg_req   => { in => [ "gp", "gp", "gp", "gp", "none", "gp", "gp" ], out => [ "in_r7" ] },
+       ins       => [ "base", "index", "cmp_left", "cmp_right", "mem", "val_true", "val_false" ],
        attr      => "pn_Cmp pn_code",
        init_attr => "attr->pn_code = pn_code;",
        latency   => 2,
@@ -1381,6 +1379,17 @@ CmpSet => {
        mode      => $mode_gp,
 },
 
+TestSet => {
+       irn_flags => "R",
+       reg_req   => { in => [ "gp", "gp", "gp", "gp", "none" ], out => [ "eax ebx ecx edx" ] },
+       ins       => [ "base", "index", "cmp_left", "cmp_right", "mem" ],
+       attr      => "pn_Cmp pn_code",
+       init_attr => "attr->pn_code = pn_code;",
+       latency   => 2,
+       units     => [ "GP" ],
+       mode      => $mode_gp,
+},
+
 xCmpSet => {
        irn_flags => "R",
        reg_req   => { in => [ "gp", "gp", "xmm", "xmm", "none" ], out => [ "eax ebx ecx edx" ] },
@@ -1688,7 +1697,7 @@ faddp => {
        op_flags  => "R",
        rd_constructor => "NONE",
        reg_req   => { },
-       emit      => '. faddp %x87_binop',
+       emit      => '. faddp%XM %x87_binop',
        attr_type => "ia32_x87_attr_t",
 },
 
@@ -1704,7 +1713,7 @@ fmulp => {
        op_flags  => "R",
        rd_constructor => "NONE",
        reg_req   => { },
-       emit      => '. fmulp %x87_binop',,
+       emit      => '. fmulp%XM %x87_binop',,
        attr_type => "ia32_x87_attr_t",
 },
 
@@ -1721,7 +1730,7 @@ fsubp => {
        rd_constructor => "NONE",
        reg_req   => { },
 # see note about gas bugs
-       emit      => '. fsubrp %x87_binop',
+       emit      => '. fsubrp%XM %x87_binop',
        attr_type => "ia32_x87_attr_t",
 },
 
@@ -1740,7 +1749,7 @@ fsubrp => {
        irn_flags => "R",
        reg_req   => { },
 # see note about gas bugs
-       emit      => '. fsubp %x87_binop',
+       emit      => '. fsubp%XM %x87_binop',
        attr_type => "ia32_x87_attr_t",
 },
 
@@ -1775,7 +1784,7 @@ fdivp => {
        rd_constructor => "NONE",
        reg_req   => { },
 # see note about gas bugs
-       emit      => '. fdivrp %x87_binop',
+       emit      => '. fdivrp%XM %x87_binop',
        attr_type => "ia32_x87_attr_t",
 },
 
@@ -1792,7 +1801,7 @@ fdivrp => {
        rd_constructor => "NONE",
        reg_req   => { },
 # see note about gas bugs
-       emit      => '. fdivp %x87_binop',
+       emit      => '. fdivp%XM %x87_binop',
        attr_type => "ia32_x87_attr_t",
 },