my $name = shift;
my $res = "";
if(defined($node->{modified_flags})) {
- $res .= "\t/*attr->data.flags |= arch_irn_flags_modify_flags;*/\n";
+ $res .= "\tset_ia32_flags(res, get_ia32_flags(res) | arch_irn_flags_modify_flags);\n";
}
if(defined($node->{am})) {
my $am = $node->{am};
Add => {
irn_flags => "R",
- reg_req => { in => [ "gp", "gp", "none", "gp", "gp" ], out => [ "in_r4" ] },
+ reg_req => { in => [ "gp", "gp", "none", "gp", "gp" ], out => [ "in_r4", "none", "flags" ] },
ins => [ "base", "index", "mem", "left", "right" ],
emit => '. add%M %binop',
am => "full,binary",
modified_flags => $status_flags
},
+l_Add => {
+ op_flags => "C",
+ reg_req => { in => [ "none", "none" ], out => [ "none" ] },
+ ins => [ "left", "right" ],
+},
+
+l_Adc => {
+ reg_req => { in => [ "none", "none", "none" ], out => [ "none" ] },
+ ins => [ "left", "right", "eflags" ],
+},
+
Add64Bit => {
irn_flags => "R",
arity => 4,
emit => '. not %S0',
units => [ "GP" ],
mode => $mode_gp,
- modified_flags => []
},
NotMem => {
emit => '. not%M %AM',
units => [ "GP" ],
mode => "mode_M",
- modified_flags => [],
},
# other operations
emit => '. jmp *%S0',
units => [ "BRANCH" ],
mode => "mode_X",
- modified_flags => []
},
Const => {
latency => 2,
units => [ "GP" ],
mode => $mode_gp,
- modified_flags => [],
},
Push => {
am => "source,binary",
latency => 2,
units => [ "GP" ],
- modified_flags => [],
},
Pop => {
am => "dest,unary",
latency => 3, # Pop is more expensive than Push on Athlon
units => [ "GP" ],
- modified_flags => [],
},
Enter => {
reg_req => { in => [ "edi", "esi", "ecx", "none" ], out => [ "edi", "esi", "ecx", "none" ] },
outs => [ "DST", "SRC", "CNT", "M" ],
units => [ "GP" ],
- modified_flags => [ "DF" ]
+# we don't care about this flag, so no need to mark this node
+# modified_flags => [ "DF" ]
},
CopyB_i => {
reg_req => { in => [ "edi", "esi", "none" ], out => [ "edi", "esi", "none" ] },
outs => [ "DST", "SRC", "M" ],
units => [ "GP" ],
- modified_flags => [ "DF" ]
+# we don't care about this flag, so no need to mark this node
+# modified_flags => [ "DF" ]
},
# Conversions
},
fpop => {
- op_flags => "R|K",
+ op_flags => "K",
reg_req => { },
cmp_attr => "return 1;",
emit => '. fstp %X0',
attr_type => "ia32_x87_attr_t",
},
+ffreep => {
+ op_flags => "K",
+ reg_req => { },
+ cmp_attr => "return 1;",
+ emit => '. ffreep %X0',
+ attr_type => "ia32_x87_attr_t",
+},
+
+emms => {
+ op_flags => "K",
+ reg_req => { },
+ cmp_attr => "return 1;",
+ emit => '. emms',
+ attr_type => "ia32_x87_attr_t",
+},
+
+femms => {
+ op_flags => "K",
+ reg_req => { },
+ cmp_attr => "return 1;",
+ emit => '. femms',
+ attr_type => "ia32_x87_attr_t",
+},
+
# compare
fcomJmp => {