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
bed2f723
Commit
bed2f723
authored
Dec 09, 2011
by
Matthias Braun
Browse files
benode: fix be_new_Perm for width!=1
parent
f2225847
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/benode.c
View file @
bed2f723
...
...
@@ -358,8 +358,19 @@ ir_node *be_new_Perm(const arch_register_class_t *cls, ir_node *block,
attr
=
(
be_node_attr_t
*
)
get_irn_generic_attr
(
irn
);
attr
->
exc
.
pin_state
=
op_pin_state_pinned
;
for
(
i
=
0
;
i
<
n
;
++
i
)
{
be_node_set_reg_class_in
(
irn
,
i
,
cls
);
be_node_set_reg_class_out
(
irn
,
i
,
cls
);
const
ir_node
*
input
=
in
[
i
];
const
arch_register_req_t
*
req
=
arch_get_irn_register_req
(
input
);
if
(
req
->
width
==
1
)
{
be_set_constr_in
(
irn
,
i
,
cls
->
class_req
);
be_set_constr_out
(
irn
,
i
,
cls
->
class_req
);
}
else
{
arch_register_req_t
*
new_req
=
allocate_reg_req
(
irn
);
new_req
->
cls
=
cls
;
new_req
->
type
=
(
req
->
type
&
arch_register_req_type_aligned
);
new_req
->
width
=
req
->
width
;
be_set_constr_in
(
irn
,
i
,
new_req
);
be_set_constr_out
(
irn
,
i
,
new_req
);
}
}
return
irn
;
...
...
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