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
6545eb91
Commit
6545eb91
authored
Nov 28, 2012
by
Christoph Mallon
Browse files
ia32: Replace get_proj() by be_get_Proj_for_pn().
parent
40db13da
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/ia32/ia32_emitter.c
View file @
6545eb91
...
...
@@ -68,6 +68,7 @@
#include "bedwarf.h"
#include "beemitter.h"
#include "begnuas.h"
#include "beutil.h"
#include "ia32_emitter.h"
#include "ia32_common_transform.h"
...
...
@@ -797,28 +798,6 @@ static void ia32_emit_exc_label(const ir_node *node)
be_emit_irprintf
(
"%lu"
,
get_ia32_exc_label_id
(
node
));
}
/**
* Returns the Proj with projection number proj and NOT mode_M
*/
static
ir_node
*
get_proj
(
const
ir_node
*
node
,
long
proj
)
{
ir_node
*
src
;
assert
(
get_irn_mode
(
node
)
==
mode_T
&&
"expected mode_T node"
);
foreach_out_edge
(
node
,
edge
)
{
src
=
get_edge_src_irn
(
edge
);
assert
(
is_Proj
(
src
)
&&
"Proj expected"
);
if
(
get_irn_mode
(
src
)
==
mode_M
)
continue
;
if
(
get_Proj_proj
(
src
)
==
proj
)
return
src
;
}
return
NULL
;
}
static
int
can_be_fallthrough
(
const
ir_node
*
node
)
{
ir_node
*
target_block
=
get_cfop_target_block
(
node
);
...
...
@@ -833,16 +812,14 @@ static void emit_ia32_Jcc(const ir_node *node)
{
int
need_parity_label
=
0
;
ia32_condition_code_t
cc
=
get_ia32_condcode
(
node
);
const
ir_node
*
proj_true
;
const
ir_node
*
proj_false
;
cc
=
determine_final_cc
(
node
,
0
,
cc
);
/* get both Projs */
proj_true
=
get_
p
roj
(
node
,
pn_ia32_Jcc_true
);
ir_node
const
*
proj_true
=
be_
get_
P
roj
_for_pn
(
node
,
pn_ia32_Jcc_true
);
assert
(
proj_true
&&
"Jcc without true Proj"
);
proj_false
=
get_
p
roj
(
node
,
pn_ia32_Jcc_false
);
ir_node
const
*
proj_false
=
be_
get_
P
roj
_for_pn
(
node
,
pn_ia32_Jcc_false
);
assert
(
proj_false
&&
"Jcc without false Proj"
);
if
(
can_be_fallthrough
(
proj_true
))
{
...
...
@@ -3093,18 +3070,16 @@ static void bemit_jp(bool odd, const ir_node *dest_block)
static
void
bemit_ia32_jcc
(
const
ir_node
*
node
)
{
ia32_condition_code_t
cc
=
get_ia32_condcode
(
node
);
const
ir_node
*
proj_true
;
const
ir_node
*
proj_false
;
const
ir_node
*
dest_true
;
const
ir_node
*
dest_false
;
cc
=
determine_final_cc
(
node
,
0
,
cc
);
/* get both Projs */
proj_true
=
get_
p
roj
(
node
,
pn_ia32_Jcc_true
);
ir_node
const
*
proj_true
=
be_
get_
P
roj
_for_pn
(
node
,
pn_ia32_Jcc_true
);
assert
(
proj_true
&&
"Jcc without true Proj"
);
proj_false
=
get_
p
roj
(
node
,
pn_ia32_Jcc_false
);
ir_node
const
*
proj_false
=
be_
get_
P
roj
_for_pn
(
node
,
pn_ia32_Jcc_false
);
assert
(
proj_false
&&
"Jcc without false Proj"
);
if
(
can_be_fallthrough
(
proj_true
))
{
...
...
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