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
ce6fdb48
Commit
ce6fdb48
authored
Apr 05, 2016
by
Christoph Mallon
Browse files
sparc: Reduce variable scope and remove redundant assert.
parent
ffc05619
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/sparc/sparc_stackframe.c
View file @
ce6fdb48
...
...
@@ -205,9 +205,6 @@ void sparc_layout_param_entities(ir_graph *const irg,
}
/* calculate offsets/create missing entities */
ir_entity
*
const
function
=
get_irg_entity
(
irg
);
ir_type
*
const
function_type
=
get_entity_type
(
function
);
bool
const
variadic
=
is_method_variadic
(
function_type
);
for
(
size_t
i
=
0
;
i
<
n_params
;
++
i
)
{
reg_or_stackslot_t
*
const
param
=
&
cconv
->
parameters
[
i
];
ir_entity
*
entity
=
param_map
[
i
];
...
...
@@ -220,7 +217,9 @@ void sparc_layout_param_entities(ir_graph *const irg,
set_entity_offset
(
entity
,
param
->
offset
);
}
if
(
variadic
)
{
ir_entity
*
const
function
=
get_irg_entity
(
irg
);
ir_type
*
const
function_type
=
get_entity_type
(
function
);
if
(
is_method_variadic
(
function_type
))
{
ir_type
*
unknown
=
get_unknown_type
();
ident
*
id
=
new_id_from_str
(
"$va_start"
);
ir_entity
*
va_start_addr
=
new_entity
(
frame_type
,
id
,
unknown
);
...
...
@@ -229,7 +228,6 @@ void sparc_layout_param_entities(ir_graph *const irg,
* original number of parameters */
ir_type
*
const
non_lowered
=
get_higher_type
(
function_type
);
size_t
const
orig_n_params
=
get_method_n_params
(
non_lowered
);
assert
(
is_method_variadic
(
function_type
));
long
offset
;
if
(
orig_n_params
<
n_params
)
{
assert
(
param_map
[
orig_n_params
]
!=
NULL
);
...
...
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