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
1391f199
Commit
1391f199
authored
Mar 29, 2006
by
Michael Beck
Browse files
debug output updated
parent
50be1698
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/ia32/ia32_x87.c
View file @
1391f199
...
@@ -337,14 +337,15 @@ static ir_node *x87_fxch_shuffle(x87_state *state, int pos, ir_node *block, ir_n
...
@@ -337,14 +337,15 @@ static ir_node *x87_fxch_shuffle(x87_state *state, int pos, ir_node *block, ir_n
attr
->
x87
[
0
]
=
&
ia32_st_regs
[
pos
];
attr
->
x87
[
0
]
=
&
ia32_st_regs
[
pos
];
attr
->
x87
[
2
]
=
&
ia32_st_regs
[
0
];
attr
->
x87
[
2
]
=
&
ia32_st_regs
[
0
];
DB
((
dbg
,
LEVEL_2
,
"%+F replaced input %d of %+F
\n
"
,
fxch
,
node_idx
,
user
));
if
(
user
)
{
DB
((
dbg
,
LEVEL_2
,
"%+F replaced input %d of %+F
\n
"
,
fxch
,
node_idx
,
user
));
if
(
user
)
set_irn_n
(
user
,
node_idx
,
fxch
);
set_irn_n
(
user
,
node_idx
,
fxch
);
}
else
{
else
{
/* This is a node from another block. Changing it's user might be wrong,
/*
sp just keep it alive.
* This is a node from a dominator block. Changing it's user might be wrong,
The "right" solution would require a new Phi, but we don't care here.
* so just keep it alive.
* The "right" solution would require a new Phi, but we don't care here.
*/
*/
keep_alive
(
fxch
);
keep_alive
(
fxch
);
}
}
...
@@ -1009,7 +1010,7 @@ static int x87_simulate_block(x87_simulator *sim, ir_node *block) {
...
@@ -1009,7 +1010,7 @@ static int x87_simulate_block(x87_simulator *sim, ir_node *block) {
/**
/**
* Create a new x87 simulator.
* Create a new x87 simulator.
*/
*/
static
void
x87_init_simulator
(
x87_simulator
*
sim
,
const
arch_env_t
*
env
)
{
static
void
x87_init_simulator
(
x87_simulator
*
sim
,
ir_graph
*
irg
,
const
arch_env_t
*
env
)
{
obstack_init
(
&
sim
->
obst
);
obstack_init
(
&
sim
->
obst
);
sim
->
blk_states
=
pmap_create
();
sim
->
blk_states
=
pmap_create
();
sim
->
env
=
env
;
sim
->
env
=
env
;
...
@@ -1017,7 +1018,8 @@ static void x87_init_simulator(x87_simulator *sim, const arch_env_t *env) {
...
@@ -1017,7 +1018,8 @@ static void x87_init_simulator(x87_simulator *sim, const arch_env_t *env) {
FIRM_DBG_REGISTER
(
dbg
,
"firm.be.ia32.x87"
);
FIRM_DBG_REGISTER
(
dbg
,
"firm.be.ia32.x87"
);
firm_dbg_set_mask
(
dbg
,
SET_LEVEL_2
);
firm_dbg_set_mask
(
dbg
,
SET_LEVEL_2
);
DB
((
dbg
,
LEVEL_1
,
"x87 Simulator started
\n
"
));
DB
((
dbg
,
LEVEL_1
,
"--------------------------------
\n
"
"x87 Simulator started for %+F
\n
"
,
irg
));
/* set the generic function pointer of instruction we must simulate */
/* set the generic function pointer of instruction we must simulate */
clear_irp_opcodes_generic_func
();
clear_irp_opcodes_generic_func
();
...
@@ -1053,7 +1055,7 @@ static void x87_init_simulator(x87_simulator *sim, const arch_env_t *env) {
...
@@ -1053,7 +1055,7 @@ static void x87_init_simulator(x87_simulator *sim, const arch_env_t *env) {
static
void
x87_destroy_simulator
(
x87_simulator
*
sim
)
{
static
void
x87_destroy_simulator
(
x87_simulator
*
sim
)
{
pmap_destroy
(
sim
->
blk_states
);
pmap_destroy
(
sim
->
blk_states
);
obstack_free
(
&
sim
->
obst
,
NULL
);
obstack_free
(
&
sim
->
obst
,
NULL
);
DB
((
dbg
,
LEVEL_1
,
"x87 Simulator stopped
\n
"
));
DB
((
dbg
,
LEVEL_1
,
"x87 Simulator stopped
\n
\n
"
));
}
}
/**
/**
...
@@ -1072,7 +1074,7 @@ void x87_simulate_graph(const arch_env_t *env, ir_graph *irg, ir_node **blk_list
...
@@ -1072,7 +1074,7 @@ void x87_simulate_graph(const arch_env_t *env, ir_graph *irg, ir_node **blk_list
be_liveness
(
irg
);
be_liveness
(
irg
);
/* create the simulator */
/* create the simulator */
x87_init_simulator
(
&
sim
,
env
);
x87_init_simulator
(
&
sim
,
irg
,
env
);
start_block
=
get_irg_start_block
(
irg
);
start_block
=
get_irg_start_block
(
irg
);
bl_state
=
x87_get_bl_state
(
&
sim
,
start_block
);
bl_state
=
x87_get_bl_state
(
&
sim
,
start_block
);
...
...
Write
Preview
Supports
Markdown
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