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
cc8a5479
Commit
cc8a5479
authored
Nov 08, 2008
by
Christoph Mallon
Browse files
Factorise common code to negate pnc.
[r23530]
parent
4d7ff739
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/ia32/ia32_emitter.c
View file @
cc8a5479
...
...
@@ -904,6 +904,12 @@ static int determine_final_pnc(const ir_node *node, int flags_pos,
return
pnc
;
}
static
pn_Cmp
ia32_get_negated_pnc
(
pn_Cmp
pnc
)
{
ir_mode
*
mode
=
pnc
&
ia32_pn_Cmp_float
?
mode_F
:
mode_Iu
;
return
get_negated_pnc
(
pnc
,
mode
);
}
void
ia32_emit_cmp_suffix_node
(
const
ir_node
*
node
,
int
flags_pos
)
{
...
...
@@ -912,13 +918,8 @@ void ia32_emit_cmp_suffix_node(const ir_node *node,
pn_Cmp
pnc
=
get_ia32_condcode
(
node
);
pnc
=
determine_final_pnc
(
node
,
flags_pos
,
pnc
);
if
(
attr
->
data
.
ins_permuted
)
{
if
(
pnc
&
ia32_pn_Cmp_float
)
{
pnc
=
get_negated_pnc
(
pnc
,
mode_F
);
}
else
{
pnc
=
get_negated_pnc
(
pnc
,
mode_Iu
);
}
}
if
(
attr
->
data
.
ins_permuted
)
pnc
=
ia32_get_negated_pnc
(
pnc
);
ia32_emit_cmp_suffix
(
pnc
);
}
...
...
@@ -990,11 +991,7 @@ static void emit_ia32_Jcc(const ir_node *node)
proj_true
=
proj_false
;
proj_false
=
t
;
if
(
pnc
&
ia32_pn_Cmp_float
)
{
pnc
=
get_negated_pnc
(
pnc
,
mode_F
);
}
else
{
pnc
=
get_negated_pnc
(
pnc
,
mode_Iu
);
}
pnc
=
ia32_get_negated_pnc
(
pnc
);
}
if
(
pnc
&
ia32_pn_Cmp_float
)
{
...
...
@@ -1081,13 +1078,8 @@ static void emit_ia32_CMov(const ir_node *node)
ia32_emitf
(
node
,
"
\t
movl %R, %R
\n
"
,
in_false
,
out
);
}
if
(
ins_permuted
)
{
if
(
pnc
&
ia32_pn_Cmp_float
)
{
pnc
=
get_negated_pnc
(
pnc
,
mode_F
);
}
else
{
pnc
=
get_negated_pnc
(
pnc
,
mode_Iu
);
}
}
if
(
ins_permuted
)
pnc
=
ia32_get_negated_pnc
(
pnc
);
/* TODO: handling of Nans isn't correct yet */
...
...
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