Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
ffa8d6f7
Commit
ffa8d6f7
authored
Jul 02, 2015
by
Christoph Mallon
Browse files
ia32: Use a template for nodes reading the carry flag.
parent
05ec9fb3
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/ia32/ia32_spec.pl
View file @
ffa8d6f7
...
...
@@ -366,6 +366,12 @@ my $xvalueop = {
mode
=>
$mode_xmm
,
};
my
$carry_user_op
=
{
irn_flags
=>
[
"
modify_flags
"
],
attr_type
=>
"
ia32_condcode_attr_t
",
fixed
=>
"
x86_condition_code_t condition_code = x86_cc_carry;
",
};
%nodes
=
(
Immediate
=>
{
...
...
@@ -393,18 +399,16 @@ AddMem => {
},
Adc
=>
{
irn_flags
=>
[
"
modify_flags
"
],
state
=>
"
exc_pinned
",
in_reqs
=>
[
"
gp
",
"
gp
",
"
none
",
"
gp
",
"
gp
",
"
flags
"
],
out_reqs
=>
[
"
in_r4 in_r5
",
"
flags
",
"
none
"
],
ins
=>
[
"
base
",
"
index
",
"
mem
",
"
left
",
"
right
",
"
eflags
"
],
outs
=>
[
"
res
",
"
flags
",
"
M
"
],
attr_type
=>
"
ia32_condcode_attr_t
",
fixed
=>
"
x86_condition_code_t condition_code = x86_cc_carry;
",
emit
=>
"
adc%M %B
",
am
=>
"
source,binary
",
latency
=>
1
,
mode
=>
$mode_gp
,
template
=>
$carry_user_op
,
state
=>
"
exc_pinned
",
in_reqs
=>
[
"
gp
",
"
gp
",
"
none
",
"
gp
",
"
gp
",
"
flags
"
],
out_reqs
=>
[
"
in_r4 in_r5
",
"
flags
",
"
none
"
],
ins
=>
[
"
base
",
"
index
",
"
mem
",
"
left
",
"
right
",
"
eflags
"
],
outs
=>
[
"
res
",
"
flags
",
"
M
"
],
emit
=>
"
adc%M %B
",
am
=>
"
source,binary
",
latency
=>
1
,
mode
=>
$mode_gp
,
},
l_Add
=>
{
...
...
@@ -531,32 +535,28 @@ SubMem => {
},
Sbb
=>
{
irn_flags
=>
[
"
modify_flags
"
],
state
=>
"
exc_pinned
",
in_reqs
=>
[
"
gp
",
"
gp
",
"
none
",
"
gp
",
"
gp
",
"
flags
"
],
out_reqs
=>
[
"
in_r4
",
"
flags
",
"
none
"
],
ins
=>
[
"
base
",
"
index
",
"
mem
",
"
minuend
",
"
subtrahend
",
"
eflags
"
],
outs
=>
[
"
res
",
"
flags
",
"
M
"
],
attr_type
=>
"
ia32_condcode_attr_t
",
fixed
=>
"
x86_condition_code_t condition_code = x86_cc_carry;
",
am
=>
"
source,binary
",
emit
=>
"
sbb%M %B
",
latency
=>
1
,
mode
=>
$mode_gp
,
template
=>
$carry_user_op
,
state
=>
"
exc_pinned
",
in_reqs
=>
[
"
gp
",
"
gp
",
"
none
",
"
gp
",
"
gp
",
"
flags
"
],
out_reqs
=>
[
"
in_r4
",
"
flags
",
"
none
"
],
ins
=>
[
"
base
",
"
index
",
"
mem
",
"
minuend
",
"
subtrahend
",
"
eflags
"
],
outs
=>
[
"
res
",
"
flags
",
"
M
"
],
am
=>
"
source,binary
",
emit
=>
"
sbb%M %B
",
latency
=>
1
,
mode
=>
$mode_gp
,
},
Sbb0
=>
{
template
=>
$carry_user_op
,
# Spiller currently fails when rematerializing flag consumers
# irn_flags => [ "modify_flags", "rematerializable" ],
irn_flags
=>
[
"
modify_flags
"
],
in_reqs
=>
[
"
flags
"
],
out_reqs
=>
[
"
gp
",
"
flags
"
],
outs
=>
[
"
res
",
"
flags
"
],
attr_type
=>
"
ia32_condcode_attr_t
",
fixed
=>
"
x86_condition_code_t condition_code = x86_cc_carry;
",
emit
=>
"
sbb%M %D0, %D0
",
latency
=>
1
,
mode
=>
$mode_gp
,
in_reqs
=>
[
"
flags
"
],
out_reqs
=>
[
"
gp
",
"
flags
"
],
outs
=>
[
"
res
",
"
flags
"
],
emit
=>
"
sbb%M %D0, %D0
",
latency
=>
1
,
mode
=>
$mode_gp
,
},
l_Sub
=>
{
...
...
@@ -727,14 +727,12 @@ NotMem => {
},
Cmc
=>
{
irn_flags
=>
[
"
modify_flags
"
],
in_reqs
=>
[
"
flags
"
],
out_reqs
=>
[
"
flags
"
],
attr_type
=>
"
ia32_condcode_attr_t
",
fixed
=>
"
x86_condition_code_t condition_code = x86_cc_carry;
",
emit
=>
"
cmc
",
latency
=>
1
,
mode
=>
$mode_flags
,
template
=>
$carry_user_op
,
in_reqs
=>
[
"
flags
"
],
out_reqs
=>
[
"
flags
"
],
emit
=>
"
cmc
",
latency
=>
1
,
mode
=>
$mode_flags
,
},
Stc
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment