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
3d04cb70
Commit
3d04cb70
authored
Dec 02, 2014
by
Christoph Mallon
Browse files
ia32: Cleanup in determine_final_cc().
parent
f314f1ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/ia32/ia32_emitter.c
View file @
3d04cb70
...
@@ -745,29 +745,23 @@ static x86_condition_code_t determine_final_cc(ir_node const *const node, int co
...
@@ -745,29 +745,23 @@ static x86_condition_code_t determine_final_cc(ir_node const *const node, int co
if
(
attr
->
attr
.
ins_permuted
)
if
(
attr
->
attr
.
ins_permuted
)
cc
=
x86_negate_condition_code
(
cc
);
cc
=
x86_negate_condition_code
(
cc
);
ir_node
*
flags
=
get_irn_n
(
node
,
flags_pos
);
ir_node
*
flags
=
skip_Proj
(
get_irn_n
(
node
,
flags_pos
));
flags
=
skip_Proj
(
flags
);
/* Permuted operands of a test instruction do not change the result. */
/* Permuted operands of a test instruction do not change the result. */
if
(
is_ia32_Test
(
flags
))
if
(
is_ia32_Test
(
flags
))
return
cc
;
return
cc
;
const
ia32_attr_t
*
flags_attr
;
if
(
is_ia32_Sahf
(
flags
))
{
if
(
is_ia32_Sahf
(
flags
))
{
ir_node
*
cmp
=
get_irn_n
(
flags
,
n_ia32_Sahf_val
);
flags
=
get_irn_n
(
flags
,
n_ia32_Sahf_val
);
if
(
!
(
is_ia32_FucomFnstsw
(
cmp
)
||
is_ia32_FucomppFnstsw
(
cmp
)
||
is_ia32_FtstFnstsw
(
cmp
)
))
{
if
(
!
is_ia32_FucomFnstsw
(
flags
)
&&
!
is_ia32_FucomppFnstsw
(
flags
)
&&
!
is_ia32_FtstFnstsw
(
flags
))
{
ir_graph
*
irg
=
get_irn_irg
(
node
);
ir_graph
*
const
irg
=
get_irn_irg
(
node
);
inc_irg_visited
(
irg
);
inc_irg_visited
(
irg
);
cmp
=
find_original_value
(
cmp
);
flags
=
find_original_value
(
flags
);
assert
(
cmp
!=
NULL
);
assert
(
is_ia32_FucomFnstsw
(
flags
)
||
is_ia32_FucomppFnstsw
(
flags
)
||
is_ia32_FtstFnstsw
(
flags
));
assert
(
is_ia32_FucomFnstsw
(
cmp
)
||
is_ia32_FucomppFnstsw
(
cmp
)
||
is_ia32_FtstFnstsw
(
cmp
));
}
}
flags_attr
=
get_ia32_attr_const
(
cmp
);
}
else
{
flags_attr
=
get_ia32_attr_const
(
flags
);
}
}
ia32_attr_t
const
*
const
flags_attr
=
get_ia32_attr_const
(
flags
);
if
(
flags_attr
->
ins_permuted
)
if
(
flags_attr
->
ins_permuted
)
cc
=
x86_invert_condition_code
(
cc
);
cc
=
x86_invert_condition_code
(
cc
);
return
cc
;
return
cc
;
...
...
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