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
c43ffc8f
Commit
c43ffc8f
authored
Feb 12, 2010
by
Matthias Braun
Browse files
put my notes into the code so they don't get lost. Removed some unused stuff
[r27129]
parent
b1cf02fe
Changes
2
Hide whitespace changes
Inline
Side-by-side
ir/be/ia32/ia32_emitter.c
View file @
c43ffc8f
...
...
@@ -22,6 +22,22 @@
* @brief This file implements the ia32 node emitter.
* @author Christian Wuerdig, Matthias Braun
* @version $Id$
*
* Summary table for x86 floatingpoint compares:
* pnc_Eq => !P && E
* pnc_Lt => !P && B
* pnc_Le => !P && BE
* pnc_Gt => A
* pnc_Ge => AE
* pnc_Lg => P || NE
* pnc_Leg => NP (ordered)
* pnc_Uo => P
* pnc_Ue => E
* pnc_Ul => B
* pnc_Ule => BE
* pnc_Ug => P || A
* pnc_Uge => P || AE
* pnc_Ne => NE
*/
#include "config.h"
...
...
@@ -1002,16 +1018,10 @@ static pn_Cmp ia32_get_negated_pnc(pn_Cmp pnc)
return
get_negated_pnc
(
pnc
,
mode
);
}
void
ia32_emit_cmp_suffix_node
(
const
ir_node
*
node
,
int
flags_pos
)
void
ia32_emit_cmp_suffix_node
(
const
ir_node
*
node
,
int
flags_pos
)
{
const
ia32_attr_t
*
attr
=
get_ia32_attr_const
(
node
);
pn_Cmp
pnc
=
get_ia32_condcode
(
node
);
pnc
=
determine_final_pnc
(
node
,
flags_pos
,
pnc
);
if
(
attr
->
data
.
ins_permuted
)
pnc
=
ia32_get_negated_pnc
(
pnc
);
ia32_emit_cmp_suffix
(
pnc
);
}
...
...
@@ -1191,7 +1201,9 @@ static void emit_ia32_CMovcc(const ir_node *node)
pnc
=
determine_final_pnc
(
node
,
n_ia32_CMovcc_eflags
,
pnc
);
/* although you can't set ins_permuted in the constructor it might still
be set by memory operand folding */
* be set by memory operand folding
* Permuting inputs of a cmov means the condition is negated!
*/
if
(
attr
->
data
.
ins_permuted
)
pnc
=
ia32_get_negated_pnc
(
pnc
);
...
...
ir/be/ia32/ia32_spec.pl
View file @
c43ffc8f
...
...
@@ -220,7 +220,6 @@ $arch = "ia32";
unop4
=>
"
${arch}
_emit_unop(node, n_ia32_binary_right);
",
binop
=>
"
${arch}
_emit_binop(node);
",
x87_binop
=>
"
${arch}
_emit_x87_binop(node);
",
CMP0
=>
"
${arch}
_emit_cmp_suffix_node(node, 0);
",
CMP3
=>
"
${arch}
_emit_cmp_suffix_node(node, 3);
",
);
...
...
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