Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
3468a2de
Commit
3468a2de
authored
Sep 27, 2011
by
Matthias Braun
Browse files
sparc: fix wrong stack-offset in omit-fp commits
parent
5f96b99f
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/sparc/sparc_stackframe.c
View file @
3468a2de
...
...
@@ -89,12 +89,6 @@ static void process_bias(ir_node *block, bool sp_relative, int bias,
}
}
#ifndef NDEBUG
if
(
block
==
get_irg_end_block
(
get_irn_irg
(
block
)))
{
assert
(
bias
==
0
);
}
#endif
/* continue at the successor blocks */
foreach_block_succ
(
block
,
edge
)
{
ir_node
*
succ
=
get_edge_src_irn
(
edge
);
...
...
@@ -259,7 +253,11 @@ void sparc_create_stacklayout(ir_graph *irg, calling_convention_t *cconv)
memset
(
layout
,
0
,
sizeof
(
*
layout
));
between_type
=
new_type_class
(
new_id_from_str
(
"sparc_between_type"
));
set_type_size_bytes
(
between_type
,
SPARC_MIN_STACKSIZE
);
if
(
cconv
->
omit_fp
)
{
set_type_size_bytes
(
between_type
,
0
);
}
else
{
set_type_size_bytes
(
between_type
,
SPARC_MIN_STACKSIZE
);
}
layout
->
frame_type
=
get_irg_frame_type
(
irg
);
layout
->
between_type
=
between_type
;
...
...
@@ -313,12 +311,18 @@ static void process_frame_types(ir_graph *irg)
void
sparc_fix_stack_bias
(
ir_graph
*
irg
)
{
int
initial_bias
;
bool
sp_relative
=
be_get_irg_stack_layout
(
irg
)
->
sp_relative
;
ir_node
*
start_block
=
get_irg_start_block
(
irg
);
process_frame_types
(
irg
);
ir_reserve_resources
(
irg
,
IR_RESOURCE_BLOCK_VISITED
);
inc_irg_block_visited
(
irg
);
process_bias
(
start_block
,
be_get_irg_stack_layout
(
irg
)
->
sp_relative
,
0
,
0
);
initial_bias
=
0
;
if
(
sp_relative
)
initial_bias
=
SPARC_MIN_STACKSIZE
;
process_bias
(
start_block
,
sp_relative
,
initial_bias
,
0
);
ir_free_resources
(
irg
,
IR_RESOURCE_BLOCK_VISITED
);
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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