+Cmp => {
+ irn_flags => "R",
+ state => "exc_pinned",
+ reg_req => { in => [ "gp", "gp", "none", "gp", "gp" ],
+ out => [ "flags", "none", "none" ] },
+ ins => [ "base", "index", "mem", "left", "right" ],
+ outs => [ "eflags", "unused", "M" ],
+ am => "source,binary",
+ emit => '. cmp%M %binop',
+ attr => "int ins_permuted, int cmp_unsigned",
+ init_attr => "attr->data.ins_permuted = ins_permuted;\n".
+ "\tattr->data.cmp_unsigned = cmp_unsigned;\n",
+ latency => 1,
+ units => [ "GP" ],
+ mode => $mode_flags,
+ modified_flags => $status_flags
+},
+
+Cmp8Bit => {
+ irn_flags => "R",
+ state => "exc_pinned",
+ reg_req => { in => [ "gp", "gp", "none", "eax ebx ecx edx", "eax ebx ecx edx" ] , out => [ "flags" ] },
+ ins => [ "base", "index", "mem", "left", "right" ],
+ outs => [ "eflags" ],
+ am => "source,binary",
+ emit => '. cmpb %binop',
+ attr => "int ins_permuted, int cmp_unsigned",
+ init_attr => "attr->data.ins_permuted = ins_permuted;\n".
+ "\tattr->data.cmp_unsigned = cmp_unsigned;\n",
+ latency => 1,
+ units => [ "GP" ],
+ mode => $mode_flags,
+ modified_flags => $status_flags
+},
+
+Test => {
+ irn_flags => "R",
+ state => "exc_pinned",
+ reg_req => { in => [ "gp", "gp", "none", "gp", "gp" ] , out => [ "flags" ] },
+ ins => [ "base", "index", "mem", "left", "right" ],
+ outs => [ "eflags" ],
+ am => "source,binary",
+ emit => '. test%M %binop',
+ attr => "int ins_permuted, int cmp_unsigned",
+ init_attr => "attr->data.ins_permuted = ins_permuted;\n".
+ "\tattr->data.cmp_unsigned = cmp_unsigned;\n",
+ latency => 1,
+ units => [ "GP" ],
+ mode => $mode_flags,
+ modified_flags => $status_flags
+},
+
+Test8Bit => {
+ irn_flags => "R",
+ state => "exc_pinned",
+ reg_req => { in => [ "gp", "gp", "none", "eax ebx ecx edx", "eax ebx ecx edx" ] , out => [ "flags" ] },
+ ins => [ "base", "index", "mem", "left", "right" ],
+ outs => [ "eflags" ],
+ am => "source,binary",
+ emit => '. testb %binop',
+ attr => "int ins_permuted, int cmp_unsigned",
+ init_attr => "attr->data.ins_permuted = ins_permuted;\n".
+ "\tattr->data.cmp_unsigned = cmp_unsigned;\n",
+ latency => 1,
+ units => [ "GP" ],
+ mode => $mode_flags,
+ modified_flags => $status_flags
+},
+
+Set => {
+ #irn_flags => "R",
+ reg_req => { in => [ "eflags" ], out => [ "eax ebx ecx edx" ] },
+ ins => [ "eflags" ],
+ attr_type => "ia32_condcode_attr_t",
+ attr => "pn_Cmp pnc, int ins_permuted",
+ init_attr => "attr->attr.data.ins_permuted = ins_permuted;\n".
+ "\tset_ia32_ls_mode(res, mode_Bu);\n",
+ emit => '. set%CMP0 %DB0',
+ latency => 1,
+ units => [ "GP" ],
+ mode => $mode_gp,
+},
+
+SetMem => {
+ #irn_flags => "R",
+ state => "exc_pinned",
+ reg_req => { in => [ "gp", "gp", "none", "eflags" ], out => [ "none" ] },
+ ins => [ "base", "index", "mem","eflags" ],
+ attr_type => "ia32_condcode_attr_t",
+ attr => "pn_Cmp pnc, int ins_permuted",
+ init_attr => "attr->attr.data.ins_permuted = ins_permuted;\n".
+ "\tset_ia32_ls_mode(res, mode_Bu);\n",
+ emit => '. set%CMP3 %AM',
+ latency => 1,
+ units => [ "GP" ],
+ mode => 'mode_M',
+},
+
+CMov => {
+ #irn_flags => "R",
+ # (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" ] },
+ ins => [ "base", "index", "mem", "val_false", "val_true", "eflags" ],
+ am => "source,binary",
+ attr_type => "ia32_condcode_attr_t",
+ attr => "int ins_permuted, pn_Cmp pnc",
+ init_attr => "attr->attr.data.ins_permuted = ins_permuted;",
+ latency => 1,
+ units => [ "GP" ],
+ mode => $mode_gp,
+},
+
+Jcc => {