+NotMem => {
+ irn_flags => [ "rematerializable" ],
+ state => "exc_pinned",
+ reg_req => { in => [ "gp", "gp", "none" ], out => [ "none" ] },
+ ins => [ "base", "index", "mem" ],
+ emit => '. not%M %AM',
+ units => [ "GP" ],
+ latency => 1,
+ mode => "mode_M",
+ # no flags modified
+},
+
+Cmc => {
+ reg_req => { in => [ "flags" ], out => [ "flags" ] },
+ emit => '.cmc',
+ units => [ "GP" ],
+ latency => 1,
+ mode => $mode_flags,
+ modified_flags => $status_flags
+},
+
+Stc => {
+ reg_req => { out => [ "flags" ] },
+ emit => '.stc',
+ units => [ "GP" ],
+ latency => 1,
+ mode => $mode_flags,
+ modified_flags => $status_flags
+},
+
+Cmp => {
+ irn_flags => [ "rematerializable" ],
+ 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 => "bool ins_permuted",
+ init_attr => "attr->data.ins_permuted = ins_permuted;",
+ latency => 1,
+ units => [ "GP" ],
+ mode => $mode_flags,
+ modified_flags => $status_flags
+},
+
+Cmp8Bit => {
+ irn_flags => [ "rematerializable" ],
+ state => "exc_pinned",
+ 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", "unused", "M" ],
+ am => "source,binary",
+ emit => '. cmpb %binop',
+ attr => "bool ins_permuted",
+ init_attr => "attr->data.ins_permuted = ins_permuted;",
+ latency => 1,
+ units => [ "GP" ],
+ mode => $mode_flags,
+ modified_flags => $status_flags
+},
+
+XorHighLow => {
+ irn_flags => [ "rematerializable" ],
+ state => "exc_pinned",
+ reg_req => { in => [ "eax ebx ecx edx" ],
+ out => [ "in_r1", "flags" ] },
+ emit => '. xorb %SH0, %SB0',
+ ins => [ "value" ],
+ outs => [ "res", "flags" ],
+ units => [ "GP" ],
+ latency => 1,
+ mode => $mode_gp,
+ modified_flags => $status_flags,
+},
+
+Test => {
+ irn_flags => [ "rematerializable" ],
+ 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 => '. test%M %binop',
+ attr => "bool ins_permuted",
+ init_attr => "attr->data.ins_permuted = ins_permuted;",
+ latency => 1,
+ units => [ "GP" ],
+ mode => $mode_flags,
+ modified_flags => $status_flags
+},
+
+Test8Bit => {
+ irn_flags => [ "rematerializable" ],
+ state => "exc_pinned",
+ 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", "unused", "M" ],
+ am => "source,binary",
+ emit => '. testb %binop',
+ attr => "bool ins_permuted",
+ init_attr => "attr->data.ins_permuted = ins_permuted;",
+ latency => 1,
+ units => [ "GP" ],
+ mode => $mode_flags,
+ modified_flags => $status_flags
+},
+
+Setcc => {
+ #irn_flags => [ "rematerializable" ],
+ reg_req => { in => [ "eflags" ], out => [ "eax ebx ecx edx" ] },
+ ins => [ "eflags" ],
+ outs => [ "res" ],
+ attr_type => "ia32_condcode_attr_t",
+ attr => "ia32_condition_code_t condition_code",
+ # The way we handle Setcc with float nodes (potentially) destroys the flags
+ # (when we emit the setX; setp; orb and the setX;setnp;andb sequences)
+ init_attr => "set_ia32_ls_mode(res, mode_Bu);\n"
+ . "\tif (condition_code & ia32_cc_additional_float_cases) {\n"
+ . "\t\tarch_add_irn_flags(res, arch_irn_flags_modify_flags);\n"
+ . "\t\t/* attr->latency = 3; */\n"
+ . "\t}\n",
+ latency => 1,
+ units => [ "GP" ],
+ mode => $mode_gp,
+},
+
+SetccMem => {
+ #irn_flags => [ "rematerializable" ],
+ state => "exc_pinned",
+ reg_req => { in => [ "gp", "gp", "none", "eflags" ], out => [ "none" ] },
+ ins => [ "base", "index", "mem","eflags" ],
+ attr_type => "ia32_condcode_attr_t",
+ attr => "ia32_condition_code_t condition_code",
+ init_attr => "set_ia32_ls_mode(res, mode_Bu);\n",
+ emit => '. set%CMP3 %AM',
+ latency => 1,
+ units => [ "GP" ],
+ mode => 'mode_M',
+},