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
ce2a2421
Commit
ce2a2421
authored
Aug 09, 2010
by
Matthias Braun
Browse files
sparc: use %g0 for 0 constants
[r27911]
parent
f0a7d482
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/sparc/sparc_transform.c
View file @
ce2a2421
...
...
@@ -153,7 +153,7 @@ static ir_node *gen_extension(dbg_info *dbgi, ir_node *block, ir_node *op,
* Creates a possible DAG for a constant.
*/
static
ir_node
*
create_const_graph_value
(
dbg_info
*
dbgi
,
ir_node
*
block
,
long
value
)
long
value
)
{
ir_node
*
result
;
...
...
@@ -650,6 +650,11 @@ static ir_node *gen_Const(ir_node *node)
return
proj
;
}
/* use the 0 register instead of a 0-constant */
if
(
is_Const_null
(
node
))
{
return
be_prolog_get_reg_value
(
abihelper
,
&
sparc_gp_regs
[
REG_G0
]);
}
return
create_const_graph
(
node
,
block
);
}
...
...
@@ -975,6 +980,8 @@ static ir_node *gen_Start(ir_node *node)
/* stackpointer is important at function prolog */
be_prolog_add_reg
(
abihelper
,
sp_reg
,
arch_register_req_type_produces_sp
|
arch_register_req_type_ignore
);
be_prolog_add_reg
(
abihelper
,
&
sparc_gp_regs
[
REG_G0
],
arch_register_req_type_ignore
);
/* function parameters in registers */
for
(
i
=
0
;
i
<
get_method_n_params
(
function_type
);
++
i
)
{
const
reg_or_stackslot_t
*
param
=
&
cconv
->
parameters
[
i
];
...
...
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