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
b05a046f
Commit
b05a046f
authored
Nov 26, 2013
by
yb9976
Browse files
Do not change the condition code of an ia32 test instruction.
This fixes backend/setcc.c.
parent
5bc3ca43
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/ia32/ia32_emitter.c
View file @
b05a046f
...
...
@@ -761,6 +761,11 @@ static x86_condition_code_t determine_final_cc(const ir_node *node,
const
ia32_attr_t
*
flags_attr
;
flags
=
skip_Proj
(
flags
);
/* Permuted operands of a test instruction do not change the result. */
if
(
is_ia32_Test
(
flags
))
{
return
cc
;
}
if
(
is_ia32_Sahf
(
flags
))
{
ir_node
*
cmp
=
get_irn_n
(
flags
,
n_ia32_Sahf_val
);
if
(
!
(
is_ia32_FucomFnstsw
(
cmp
)
||
is_ia32_FucomppFnstsw
(
cmp
)
||
is_ia32_FtstFnstsw
(
cmp
)))
{
...
...
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