ia32_IJmp needs the no-out-requirements hack, too.
[libfirm] / ir / be / ia32 / ia32_spec.pl
index 5685063..ff82198 100644 (file)
@@ -103,7 +103,7 @@ $arch = "ia32";
 #   0 - no special type
 #   1 - caller save (register must be saved by the caller of a function)
 #   2 - callee save (register must be saved by the called function)
-#   4 - ignore (do not assign this register)
+#   4 - ignore (do not automatically assign this register)
 #   8 - emitter can choose an arbitrary register of this class
 #  16 - the register is a virtual one
 #  32 - register represents a state
@@ -202,10 +202,13 @@ $arch = "ia32";
        SB2 => "${arch}_emit_8bit_source_register_or_immediate(node, 2);",
        SB3 => "${arch}_emit_8bit_source_register_or_immediate(node, 3);",
        SH0 => "${arch}_emit_8bit_high_source_register(node, 0);",
+       SS0 => "${arch}_emit_16bit_source_register_or_immediate(node, 0);",
+       SI0 => "${arch}_emit_source_register_or_immediate(node, 0);",
        SI1 => "${arch}_emit_source_register_or_immediate(node, 1);",
        SI3 => "${arch}_emit_source_register_or_immediate(node, 3);",
        D0 => "${arch}_emit_dest_register(node, 0);",
        D1 => "${arch}_emit_dest_register(node, 1);",
+       DS0 => "${arch}_emit_dest_register_size(node, 0);",
        DB0 => "${arch}_emit_8bit_dest_register(node, 0);",
        X0 => "${arch}_emit_x87_register(node, 0);",
        X1 => "${arch}_emit_x87_register(node, 1);",
@@ -270,28 +273,28 @@ $custom_init_attr_func = \&ia32_custom_init_attr;
 
 %init_attr = (
        ia32_asm_attr_t =>
-               "\tinit_ia32_attributes(res, flags, in_reqs, out_reqs, exec_units, n_res);\n".
+               "\tinit_ia32_attributes(res, flags, in_reqs, exec_units, n_res);\n".
                "\tinit_ia32_x87_attributes(res);".
                "\tinit_ia32_asm_attributes(res);",
        ia32_attr_t     =>
-               "\tinit_ia32_attributes(res, flags, in_reqs, out_reqs, exec_units, n_res);",
+               "\tinit_ia32_attributes(res, flags, in_reqs, exec_units, n_res);",
        ia32_call_attr_t =>
-               "\tinit_ia32_attributes(res, flags, in_reqs, out_reqs, exec_units, n_res);\n".
+               "\tinit_ia32_attributes(res, flags, in_reqs, exec_units, n_res);\n".
                "\tinit_ia32_call_attributes(res, pop, call_tp);",
        ia32_condcode_attr_t =>
-               "\tinit_ia32_attributes(res, flags, in_reqs, out_reqs, exec_units, n_res);\n".
+               "\tinit_ia32_attributes(res, flags, in_reqs, exec_units, n_res);\n".
                "\tinit_ia32_condcode_attributes(res, pnc);",
        ia32_copyb_attr_t =>
-               "\tinit_ia32_attributes(res, flags, in_reqs, out_reqs, exec_units, n_res);\n".
+               "\tinit_ia32_attributes(res, flags, in_reqs, exec_units, n_res);\n".
                "\tinit_ia32_copyb_attributes(res, size);",
        ia32_immediate_attr_t =>
-               "\tinit_ia32_attributes(res, flags, in_reqs, out_reqs, exec_units, n_res);\n".
-               "\tinit_ia32_immediate_attributes(res, symconst, symconst_sign, offset);",
+               "\tinit_ia32_attributes(res, flags, in_reqs, exec_units, n_res);\n".
+               "\tinit_ia32_immediate_attributes(res, symconst, symconst_sign, no_pic_adjust, offset);",
        ia32_x87_attr_t =>
-               "\tinit_ia32_attributes(res, flags, in_reqs, out_reqs, exec_units, n_res);\n".
+               "\tinit_ia32_attributes(res, flags, in_reqs, exec_units, n_res);\n".
                "\tinit_ia32_x87_attributes(res);",
        ia32_climbframe_attr_t =>
-               "\tinit_ia32_attributes(res, flags, in_reqs, out_reqs, exec_units, n_res);\n".
+               "\tinit_ia32_attributes(res, flags, in_reqs, exec_units, n_res);\n".
                "\tinit_ia32_climbframe_attributes(res, count);",
 );
 
@@ -324,7 +327,7 @@ Immediate => {
        state     => "pinned",
        op_flags  => "c",
        reg_req   => { out => [ "gp_NOREG:I" ] },
-       attr      => "ir_entity *symconst, int symconst_sign, long offset",
+       attr      => "ir_entity *symconst, int symconst_sign, int no_pic_adjust, long offset",
        attr_type => "ia32_immediate_attr_t",
        hash_func => "ia32_hash_Immediate",
        latency   => 0,
@@ -437,10 +440,10 @@ Mul => {
        # very strict constraints
        state     => "exc_pinned",
        reg_req   => { in => [ "gp", "gp", "none", "eax", "gp" ],
-                      out => [ "eax", "flags", "edx", "none" ] },
+                      out => [ "eax", "flags", "none", "edx" ] },
        ins       => [ "base", "index", "mem", "left", "right" ],
        emit      => '. mul%M %unop4',
-       outs      => [ "res_low", "flags", "res_high", "M" ],
+       outs      => [ "res_low", "flags", "M", "res_high" ],
        am        => "source,binary",
        latency   => 10,
        units     => [ "GP" ],
@@ -452,8 +455,10 @@ l_Mul => {
        # very strict constraints
        op_flags  => "C",
        cmp_attr  => "return 1;",
-       outs      => [ "EAX", "flags", "EDX", "M" ],
-       arity     => 2
+       reg_req   => { in => [ "none", "none" ],
+                      out => [ "none", "none", "none", "none" ] },
+       ins       => [ "left", "right" ],
+       outs      => [ "res_low", "flags", "M", "res_high" ],
 },
 
 IMul => {
@@ -476,10 +481,10 @@ IMul1OP => {
        irn_flags => "R",
        state     => "exc_pinned",
        reg_req   => { in => [ "gp", "gp", "none", "eax", "gp" ],
-                      out => [ "eax", "flags", "edx", "none" ] },
+                      out => [ "eax", "flags", "none", "edx" ] },
        ins       => [ "base", "index", "mem", "left", "right" ],
        emit      => '. imul%M %unop4',
-       outs      => [ "res_low", "flags", "res_high", "M" ],
+       outs      => [ "res_low", "flags", "M", "res_high" ],
        am        => "source,binary",
        latency   => 5,
        units     => [ "GP" ],
@@ -489,8 +494,10 @@ IMul1OP => {
 l_IMul => {
        op_flags  => "C",
        cmp_attr  => "return 1;",
-       outs      => [ "res_low", "res_high", "M" ],
-       arity     => 2
+       reg_req   => { in => [ "none", "none" ],
+                      out => [ "none", "none", "none", "none" ] },
+       ins       => [ "left", "right" ],
+       outs      => [ "res_low", "flags", "M", "res_high" ],
 },
 
 And => {
@@ -754,8 +761,8 @@ ShlMem => {
 
 l_ShlDep => {
        cmp_attr => "return 1;",
+       reg_req  => { in => [ "none", "none", "none" ], out => [ "none" ] },
        ins      => [ "val", "count", "dep" ],
-       arity    => 3
 },
 
 ShlD => {
@@ -773,8 +780,8 @@ ShlD => {
 
 l_ShlD => {
        cmp_attr  => "return 1;",
+       reg_req  => { in => [ "none", "none", "none" ], out => [ "none" ] },
        ins       => [ "val_high", "val_low", "count" ],
-       arity     => 3,
 },
 
 Shr => {
@@ -804,8 +811,8 @@ ShrMem => {
 
 l_ShrDep => {
        cmp_attr  => "return 1;",
+       reg_req   => { in => [ "none", "none", "none" ], out => [ "none" ] },
        ins       => [ "val", "count", "dep" ],
-       arity     => 3
 },
 
 ShrD => {
@@ -823,7 +830,7 @@ ShrD => {
 
 l_ShrD => {
        cmp_attr  => "return 1;",
-       arity     => 3,
+       reg_req   => { in => [ "none", "none", "none" ], out => [ "none" ] },
        ins       => [ "val_high", "val_low", "count" ],
 },
 
@@ -855,7 +862,7 @@ SarMem => {
 l_SarDep => {
        cmp_attr  => "return 1;",
        ins       => [ "val", "count", "dep" ],
-       arity     => 3
+       reg_req   => { in => [ "none", "none", "none" ], out => [ "none" ] },
 },
 
 Ror => {
@@ -1061,9 +1068,10 @@ Cmp => {
 Cmp8Bit => {
        irn_flags => "R",
        state     => "exc_pinned",
-       reg_req   => { in => [ "gp", "gp", "none", "eax ebx ecx edx", "eax ebx ecx edx" ] , out => [ "flags" ] },
+       reg_req   => { in => [ "gp", "gp", "none", "eax ebx ecx edx", "eax ebx ecx edx" ] ,
+                      out => [ "flags", "none", "none" ] },
        ins       => [ "base", "index", "mem", "left", "right" ],
-       outs      => [ "eflags" ],
+       outs      => [ "eflags", "unused", "M" ],
        am        => "source,binary",
        emit      => '. cmpb %binop',
        attr      => "int ins_permuted, int cmp_unsigned",
@@ -1078,9 +1086,10 @@ Cmp8Bit => {
 Test => {
        irn_flags => "R",
        state     => "exc_pinned",
-       reg_req   => { in => [ "gp", "gp", "none", "gp", "gp" ] , out => [ "flags" ] },
+       reg_req   => { in => [ "gp", "gp", "none", "gp", "gp" ] ,
+                      out => [ "flags", "none", "none" ] },
        ins       => [ "base", "index", "mem", "left", "right" ],
-       outs      => [ "eflags" ],
+       outs      => [ "eflags", "unused", "M" ],
        am        => "source,binary",
        emit      => '. test%M %binop',
        attr      => "int ins_permuted, int cmp_unsigned",
@@ -1095,9 +1104,10 @@ Test => {
 Test8Bit => {
        irn_flags => "R",
        state     => "exc_pinned",
-       reg_req   => { in => [ "gp", "gp", "none", "eax ebx ecx edx", "eax ebx ecx edx" ] , out => [ "flags" ] },
+       reg_req   => { in => [ "gp", "gp", "none", "eax ebx ecx edx", "eax ebx ecx edx" ] ,
+                      out => [ "flags", "none", "none" ] },
        ins       => [ "base", "index", "mem", "left", "right" ],
-       outs      => [ "eflags" ],
+       outs      => [ "eflags", "unused", "M" ],
        am        => "source,binary",
        emit      => '. testb %binop',
        attr      => "int ins_permuted, int cmp_unsigned",
@@ -1143,8 +1153,10 @@ CMov => {
        # (note: leave the false,true order intact to make it compatible with other
        #  ia32_binary ops)
        state     => "exc_pinned",
-       reg_req   => { in => [ "gp", "gp", "none", "gp", "gp", "eflags" ], out => [ "in_r4 in_r5" ] },
+       reg_req   => { in => [ "gp", "gp", "none", "gp", "gp", "eflags" ],
+                      out => [ "in_r4 in_r5", "flags", "none" ] },
        ins       => [ "base", "index", "mem", "val_false", "val_true", "eflags" ],
+       outs      => [ "res", "flags", "M" ],
        am        => "source,binary",
        attr_type => "ia32_condcode_attr_t",
        attr      => "int ins_permuted, pn_Cmp pnc",
@@ -1169,13 +1181,23 @@ Jcc => {
 SwitchJmp => {
        state     => "pinned",
        op_flags  => "L|X|Y",
-       reg_req   => { in => [ "gp" ], out => [ "none" ] },
+       reg_req   => { in => [ "gp" ] },
        mode      => "mode_T",
        attr_type => "ia32_condcode_attr_t",
        attr      => "long pnc",
        latency   => 3,
        units     => [ "BRANCH" ],
        modified_flags => $status_flags,
+       init_attr => "info->out_infos = NULL;", # XXX ugly hack for out requirements
+},
+
+Jmp => {
+       state    => "pinned",
+       op_flags => "X",
+       reg_req  => { out => [ "none" ] },
+       latency  => 1,
+       units    => [ "BRANCH" ],
+       mode     => "mode_X",
 },
 
 IJmp => {
@@ -1188,6 +1210,7 @@ IJmp => {
        latency   => 1,
        units     => [ "BRANCH" ],
        mode      => "mode_X",
+       init_attr => "info->out_infos = NULL;", # XXX ugly hack for out requirements
 },
 
 Const => {
@@ -1195,7 +1218,7 @@ Const => {
        irn_flags => "R",
        reg_req   => { out => [ "gp" ] },
        units     => [ "GP" ],
-       attr      => "ir_entity *symconst, int symconst_sign, long offset",
+       attr      => "ir_entity *symconst, int symconst_sign, int no_pic_adjust, long offset",
        attr_type => "ia32_immediate_attr_t",
        latency   => 1,
        mode      => $mode_gp,
@@ -1333,9 +1356,10 @@ Cltd => {
 Load => {
        op_flags  => "L|F",
        state     => "exc_pinned",
-       reg_req   => { in => [ "gp", "gp", "none" ], out => [ "gp", "none", "none" ] },
+       reg_req   => { in => [ "gp", "gp", "none" ],
+                      out => [ "gp", "none", "none", "none" ] },
        ins       => [ "base", "index", "mem" ],
-       outs      => [ "res", "M", "X_exc" ],
+       outs      => [ "res", "unused", "M", "X_exc" ],
        latency   => 0,
        emit      => ". mov%EX%.l %AM, %D0",
        units     => [ "GP" ],
@@ -1624,6 +1648,37 @@ UD2 => {
        mode      => mode_M,
 },
 
+#
+# outport
+#
+Outport => {
+       irn_flags => "R",
+       state     => "pinned",
+       reg_req   => { in => [ "edx", "eax", "none" ], out => [ "none" ] },
+       ins       => [ "port", "value", "mem" ],
+       emit      => '. out%M %SS0, %SI1',
+       units     => [ "GP" ],
+       latency   => 1,
+       mode      => mode_M,
+       modified_flags => $status_flags
+},
+
+#
+# inport
+#
+Inport => {
+       irn_flags => "R",
+       state     => "pinned",
+       reg_req   => { in => [ "edx", "none" ], out => [ "eax", "none" ] },
+       ins       => [ "port", "mem" ],
+       outs      => [ "res", "M" ],
+       emit      => '. in%M %DS0, %SS0',
+       units     => [ "GP" ],
+       latency   => 1,
+       mode      => mode_T,
+       modified_flags => $status_flags
+},
+
 #
 # Intel style prefetching
 #
@@ -1779,8 +1834,10 @@ xMovd  => {
 xAdd => {
        irn_flags => "R",
        state     => "exc_pinned",
-       reg_req   => { in => [ "gp", "gp", "none", "xmm", "xmm" ], out => [ "in_r4 in_r5" ] },
+       reg_req   => { in => [ "gp", "gp", "none", "xmm", "xmm" ],
+                      out => [ "in_r4 in_r5", "flags", "none" ] },
        ins       => [ "base", "index", "mem", "left", "right" ],
+       outs      => [ "res", "flags", "M" ],
        am        => "source,binary",
        emit      => '. add%XXM %binop',
        latency   => 4,
@@ -1791,8 +1848,10 @@ xAdd => {
 xMul => {
        irn_flags => "R",
        state     => "exc_pinned",
-       reg_req   => { in => [ "gp", "gp", "none", "xmm", "xmm" ], out => [ "in_r4 in_r5" ] },
+       reg_req   => { in => [ "gp", "gp", "none", "xmm", "xmm" ],
+                      out => [ "in_r4 in_r5", "flags", "none" ] },
        ins       => [ "base", "index", "mem", "left", "right" ],
+       outs      => [ "res", "flags", "M" ],
        am        => "source,binary",
        emit      => '. mul%XXM %binop',
        latency   => 4,
@@ -1803,8 +1862,10 @@ xMul => {
 xMax => {
        irn_flags => "R",
        state     => "exc_pinned",
-       reg_req   => { in => [ "gp", "gp", "none", "xmm", "xmm" ], out => [ "in_r4 in_r5" ] },
+       reg_req   => { in => [ "gp", "gp", "none", "xmm", "xmm" ],
+                      out => [ "in_r4 in_r5", "flags", "none" ] },
        ins       => [ "base", "index", "mem", "left", "right" ],
+       outs      => [ "res", "flags", "M" ],
        am        => "source,binary",
        emit      => '. max%XXM %binop',
        latency   => 2,
@@ -1815,8 +1876,10 @@ xMax => {
 xMin => {
        irn_flags => "R",
        state     => "exc_pinned",
-       reg_req   => { in => [ "gp", "gp", "none", "xmm", "xmm" ], out => [ "in_r4 in_r5" ] },
+       reg_req   => { in => [ "gp", "gp", "none", "xmm", "xmm" ],
+                      out => [ "in_r4 in_r5", "flags", "none" ] },
        ins       => [ "base", "index", "mem", "left", "right" ],
+       outs      => [ "res", "flags", "M" ],
        am        => "source,binary",
        emit      => '. min%XXM %binop',
        latency   => 2,
@@ -1827,8 +1890,10 @@ xMin => {
 xAnd => {
        irn_flags => "R",
        state     => "exc_pinned",
-       reg_req   => { in => [ "gp", "gp", "none", "xmm", "xmm" ], out => [ "in_r4 in_r5" ] },
+       reg_req   => { in => [ "gp", "gp", "none", "xmm", "xmm" ],
+                      out => [ "in_r4 in_r5", "flags", "none" ] },
        ins       => [ "base", "index", "mem", "left", "right" ],
+       outs      => [ "res", "flags", "M" ],
        am        => "source,binary",
        emit      => '. andp%XSD %binop',
        latency   => 3,
@@ -1839,8 +1904,10 @@ xAnd => {
 xOr => {
        irn_flags => "R",
        state     => "exc_pinned",
-       reg_req   => { in => [ "gp", "gp", "none", "xmm", "xmm" ], out => [ "in_r4 in_r5" ] },
+       reg_req   => { in => [ "gp", "gp", "none", "xmm", "xmm" ],
+                      out => [ "in_r4 in_r5", "flags", "none" ] },
        ins       => [ "base", "index", "mem", "left", "right" ],
+       outs      => [ "res", "flags", "M" ],
        am        => "source,binary",
        emit      => '. orp%XSD %binop',
        latency   => 3,
@@ -1851,8 +1918,10 @@ xOr => {
 xXor => {
        irn_flags => "R",
        state     => "exc_pinned",
-       reg_req   => { in => [ "gp", "gp", "none", "xmm", "xmm" ], out => [ "in_r4 in_r5" ] },
+       reg_req   => { in => [ "gp", "gp", "none", "xmm", "xmm" ],
+                      out => [ "in_r4 in_r5", "flags", "none" ] },
        ins       => [ "base", "index", "mem", "left", "right" ],
+       outs      => [ "res", "flags", "M" ],
        am        => "source,binary",
        emit      => '. xorp%XSD %binop',
        latency   => 3,
@@ -1865,8 +1934,10 @@ xXor => {
 xAndNot => {
        irn_flags => "R",
        state     => "exc_pinned",
-       reg_req   => { in => [ "gp", "gp", "none", "xmm", "xmm" ], out => [ "in_r4 !in_r5" ] },
+       reg_req   => { in => [ "gp", "gp", "none", "xmm", "xmm" ],
+                      out => [ "in_r4 !in_r5", "flags", "none" ] },
        ins       => [ "base", "index", "mem", "left", "right" ],
+       outs      => [ "res", "flags", "M" ],
        am        => "source,binary",
        emit      => '. andnp%XSD %binop',
        latency   => 3,
@@ -1877,8 +1948,10 @@ xAndNot => {
 xSub => {
        irn_flags => "R",
        state     => "exc_pinned",
-       reg_req   => { in => [ "gp", "gp", "none", "xmm", "xmm" ], out => [ "in_r4" ] },
+       reg_req   => { in => [ "gp", "gp", "none", "xmm", "xmm" ],
+                      out => [ "in_r4", "flags", "none" ] },
        ins       => [ "base", "index", "mem", "minuend", "subtrahend" ],
+       outs      => [ "res", "flags", "M" ],
        am        => "source,binary",
        emit      => '. sub%XXM %binop',
        latency   => 4,
@@ -1889,10 +1962,11 @@ xSub => {
 xDiv => {
        irn_flags => "R",
        state     => "exc_pinned",
-       reg_req   => { in => [ "gp", "gp", "none", "xmm", "xmm" ], out => [ "in_r4 !in_r5", "none" ] },
+       reg_req   => { in => [ "gp", "gp", "none", "xmm", "xmm" ],
+                      out => [ "in_r4 !in_r5", "flags", "none" ] },
        ins       => [ "base", "index", "mem", "dividend", "divisor" ],
+       outs      => [ "res", "flags", "M" ],
        am        => "source,binary",
-       outs      => [ "res", "M" ],
        emit      => '. div%XXM %binop',
        latency   => 16,
        units     => [ "SSE" ],
@@ -1903,7 +1977,8 @@ xDiv => {
 Ucomi => {
        irn_flags => "R",
        state     => "exc_pinned",
-       reg_req   => { in => [ "gp", "gp", "none", "xmm", "xmm" ], out => [ "eflags" ] },
+       reg_req   => { in => [ "gp", "gp", "none", "xmm", "xmm" ],
+                      out => [ "eflags" ] },
        ins       => [ "base", "index", "mem", "left", "right" ],
        outs      => [ "flags" ],
        am        => "source,binary",
@@ -1921,9 +1996,10 @@ Ucomi => {
 xLoad => {
        op_flags  => "L|F",
        state     => "exc_pinned",
-       reg_req   => { in => [ "gp", "gp", "none" ], out => [ "xmm", "none", "none" ] },
+       reg_req   => { in => [ "gp", "gp", "none" ],
+                      out => [ "xmm", "none", "none", "none" ] },
        ins       => [ "base", "index", "mem" ],
-       outs      => [ "res", "M", "X_exc" ],
+       outs      => [ "res", "unused", "M", "X_exc" ],
        emit      => '. mov%XXM %AM, %D0',
        attr      => "ir_mode *load_mode",
        init_attr => "attr->ls_mode = load_mode;",
@@ -1946,8 +2022,9 @@ xStore => {
 xStoreSimple => {
        op_flags => "L|F",
        state    => "exc_pinned",
-       reg_req  => { in => [ "gp", "gp", "none", "xmm" ] },
+       reg_req  => { in => [ "gp", "gp", "none", "xmm" ], out => [ "none" ] },
        ins      => [ "base", "index", "mem", "val" ],
+       outs     => [ "M" ],
        emit     => '. mov%XXM %S3, %AM',
        latency  => 0,
        units    => [ "SSE" ],
@@ -1983,6 +2060,7 @@ l_LLtoFloat => {
        op_flags => "L|F",
        cmp_attr => "return 1;",
        ins      => [ "val_high", "val_low" ],
+       reg_req  => { in => [ "none", "none" ], out => [ "none" ] }
 },
 
 l_FloattoLL => {
@@ -1990,6 +2068,7 @@ l_FloattoLL => {
        cmp_attr => "return 1;",
        ins      => [ "val" ],
        outs     => [ "res_high", "res_low" ],
+       reg_req  => { in => [ "none" ], out => [ "none", "none" ] }
 },
 
 # CopyB
@@ -2035,9 +2114,10 @@ Cwtl => {
 
 Conv_I2I => {
        state     => "exc_pinned",
-       reg_req   => { in => [ "gp", "gp", "none", "gp" ], out => [ "gp", "none" ] },
+       reg_req   => { in => [ "gp", "gp", "none", "gp" ],
+                      out => [ "gp", "none", "none" ] },
        ins       => [ "base", "index", "mem", "val" ],
-       outs      => [ "res", "M" ],
+       outs      => [ "res", "flags", "M" ],
        am        => "source,unary",
        units     => [ "GP" ],
        latency   => 1,
@@ -2048,8 +2128,10 @@ Conv_I2I => {
 
 Conv_I2I8Bit => {
        state     => "exc_pinned",
-       reg_req   => { in => [ "gp", "gp", "none", "eax ebx ecx edx" ], out => [ "gp", "none" ] },
+       reg_req   => { in => [ "gp", "gp", "none", "eax ebx ecx edx" ],
+                      out => [ "gp", "none", "none" ] },
        ins       => [ "base", "index", "mem", "val" ],
+       outs      => [ "res", "flags", "M" ],
        am        => "source,unary",
        units     => [ "GP" ],
        latency   => 1,
@@ -2187,9 +2269,10 @@ vfld => {
        irn_flags => "R",
        op_flags  => "L|F",
        state     => "exc_pinned",
-       reg_req   => { in => [ "gp", "gp", "none" ], out => [ "vfp", "none", "none" ] },
+       reg_req   => { in => [ "gp", "gp", "none" ],
+                      out => [ "vfp", "none", "none", "none" ] },
        ins       => [ "base", "index", "mem" ],
-       outs      => [ "res", "M", "X_exc" ],
+       outs      => [ "res", "unused", "M", "X_exc" ],
        attr      => "ir_mode *load_mode",
        init_attr => "attr->attr.ls_mode = load_mode;",
        latency   => 2,
@@ -2201,7 +2284,8 @@ vfst => {
        irn_flags => "R",
        op_flags  => "L|F",
        state     => "exc_pinned",
-       reg_req   => { in => [ "gp", "gp", "none", "vfp" ], out => [ "none", "none" ] },
+       reg_req   => { in => [ "gp", "gp", "none", "vfp" ],
+                      out => [ "none", "none" ] },
        ins       => [ "base", "index", "mem", "val" ],
        outs      => [ "M", "X_exc" ],
        attr      => "ir_mode *store_mode",
@@ -2216,8 +2300,9 @@ vfst => {
 
 vfild => {
        state     => "exc_pinned",
-       reg_req   => { in => [ "gp", "gp", "none" ], out => [ "vfp", "none" ] },
-       outs      => [ "res", "M" ],
+       reg_req   => { in => [ "gp", "gp", "none" ],
+                      out => [ "vfp", "none", "none" ] },
+       outs      => [ "res", "unused", "M" ],
        ins       => [ "base", "index", "mem" ],
        latency   => 4,
        units     => [ "VFP" ],
@@ -2226,8 +2311,9 @@ vfild => {
 
 vfist => {
        state     => "exc_pinned",
-       reg_req   => { in => [ "gp", "gp", "none", "vfp", "fpcw" ] },
+       reg_req   => { in => [ "gp", "gp", "none", "vfp", "fpcw" ], out => [ "none" ] },
        ins       => [ "base", "index", "mem", "val", "fpcw" ],
+       outs      => [ "M" ],
        latency   => 4,
        units     => [ "VFP" ],
        mode      => "mode_M",
@@ -2598,7 +2684,7 @@ fistp => {
        latency   => 2,
 },
 
-# SSE3 firsttp instruction
+# SSE3 fisttp instruction
 fisttp => {
        state     => "exc_pinned",
        rd_constructor => "NONE",
@@ -2680,7 +2766,7 @@ fldl2e => {
 
 fxch => {
        op_flags  => "R|K",
-       reg_req   => { },
+       reg_req   => { out => [ "none" ] },
        cmp_attr  => "return 1;",
        emit      => '. fxch %X0',
        attr_type => "ia32_x87_attr_t",
@@ -2690,7 +2776,7 @@ fxch => {
 
 fpush => {
        op_flags  => "R|K",
-       reg_req   => {},
+       reg_req   => { out => [ "none" ] },
        cmp_attr  => "return 1;",
        emit      => '. fld %X0',
        attr_type => "ia32_x87_attr_t",
@@ -2708,7 +2794,7 @@ fpushCopy => {
 
 fpop => {
        op_flags  => "K",
-       reg_req   => { },
+       reg_req   => { out => [ "none" ] },
        cmp_attr  => "return 1;",
        emit      => '. fstp %X0',
        attr_type => "ia32_x87_attr_t",
@@ -2718,7 +2804,7 @@ fpop => {
 
 ffreep => {
        op_flags  => "K",
-       reg_req   => { },
+       reg_req   => { out => [ "none" ] },
        cmp_attr  => "return 1;",
        emit      => '. ffreep %X0',
        attr_type => "ia32_x87_attr_t",
@@ -2728,7 +2814,7 @@ ffreep => {
 
 emms => {
        op_flags  => "K",
-       reg_req   => { },
+       reg_req   => { out => [ "none" ] },
        cmp_attr  => "return 1;",
        emit      => '. emms',
        attr_type => "ia32_x87_attr_t",
@@ -2738,7 +2824,7 @@ emms => {
 
 femms => {
        op_flags  => "K",
-       reg_req   => { },
+       reg_req   => { out => [ "none" ] },
        cmp_attr  => "return 1;",
        emit      => '. femms',
        attr_type => "ia32_x87_attr_t",