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
cd932032
Commit
cd932032
authored
Jan 15, 2016
by
Christoph Mallon
Browse files
sparc: Let cconv calculate the optional stack offset for register parameters.
This fixes backend/sparc_stackframe.
parent
461ef096
Changes
2
Hide whitespace changes
Inline
Side-by-side
ir/be/sparc/sparc_cconv.c
View file @
cd932032
...
...
@@ -220,6 +220,7 @@ calling_convention_t *sparc_decide_calling_convention(ir_type *function_type,
}
if
(
regnum
<
n_param_regs
)
{
param
->
offset
=
SPARC_PARAMS_SPILL_OFFSET
+
regnum
*
SPARC_REGISTER_SIZE
;
arch_register_t
const
*
reg
=
param_regs
[
regnum
++
];
if
(
irg
==
NULL
||
omit_fp
)
reg
=
map_i_to_o_reg
(
reg
);
...
...
ir/be/sparc/sparc_stackframe.c
View file @
cd932032
...
...
@@ -238,10 +238,8 @@ static ir_type *compute_arg_type(ir_graph *irg, calling_convention_t *cconv,
if
(
param
->
reg0
!=
NULL
)
{
/* use reserved spill space on between type */
if
(
entity
!=
NULL
)
{
long
offset
=
SPARC_PARAMS_SPILL_OFFSET
+
i
*
SPARC_REGISTER_SIZE
;
assert
(
i
<
SPARC_N_PARAM_REGS
);
set_entity_owner
(
entity
,
between_type
);
set_entity_offset
(
entity
,
offset
);
set_entity_offset
(
entity
,
param
->
offset
);
}
continue
;
}
...
...
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