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
9ac40ed1
Commit
9ac40ed1
authored
Jul 28, 2015
by
Christoph Mallon
Browse files
amd64: Just set the register directly instead of creating an otherwise unused Proj for that.
parent
130e13ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/amd64/amd64_finish.c
View file @
9ac40ed1
...
...
@@ -87,8 +87,8 @@ static void transform_sub_to_neg_add(ir_node *node,
const
arch_register_t
*
in2_reg
=
arch_get_irn_register
(
in2
);
const
amd64_binop_addr_attr_t
*
attr
=
get_amd64_binop_addr_attr
(
node
);
ir_node
*
add
,
*
add
_res
;
ir_node
*
add
;
unsigned
pos
;
if
(
is_amd64_subs
(
node
))
{
int
bits
=
get_insn_mode_bits
(
attr
->
base
.
insn_mode
);
ir_tarval
*
tv
=
get_mode_one
(
amd64_mode_xmm
);
...
...
@@ -111,8 +111,8 @@ static void transform_sub_to_neg_add(ir_node *node,
arch_set_irn_register
(
neg
,
in2_reg
);
ir_node
*
in
[]
=
{
neg
,
in1
};
add
=
new_bd_amd64_adds
(
dbgi
,
block
,
ARRAY_SIZE
(
in
),
in
,
attr
);
add_res
=
be_new_Proj
(
add
,
pn_amd64_adds_res
)
;
add
=
new_bd_amd64_adds
(
dbgi
,
block
,
ARRAY_SIZE
(
in
),
in
,
attr
);
pos
=
pn_amd64_adds_res
;
}
else
{
assert
(
is_amd64_sub
(
node
));
ir_node
*
neg
=
new_bd_amd64_neg
(
dbgi
,
block
,
in2
,
attr
->
base
.
insn_mode
);
...
...
@@ -121,11 +121,11 @@ static void transform_sub_to_neg_add(ir_node *node,
ir_node
*
const
neg_res
=
be_new_Proj
(
neg
,
pn_amd64_neg_res
);
ir_node
*
in
[]
=
{
neg_res
,
in1
};
add
=
new_bd_amd64_add
(
dbgi
,
block
,
ARRAY_SIZE
(
in
),
in
,
attr
);
add_res
=
be_new_Proj
(
add
,
pn_amd64_add_res
)
;
add
=
new_bd_amd64_add
(
dbgi
,
block
,
ARRAY_SIZE
(
in
),
in
,
attr
);
pos
=
pn_amd64_add_res
;
}
arch_set_irn_register_reqs_in
(
add
,
arch_get_irn_register_reqs_in
(
node
));
arch_set_irn_register
(
add_re
s
,
out_reg
);
arch_set_irn_register
_out
(
add
,
po
s
,
out_reg
);
/* exchange the add and the sub */
sched_replace
(
node
,
add
);
...
...
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