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
773ded91
Commit
773ded91
authored
Jun 18, 2012
by
Christoph Mallon
Committed by
Matthias Braun
Jan 09, 2013
Browse files
Factorise code to transform unary ops on AMD64.
parent
40b1e0a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/amd64/amd64_transform.c
View file @
773ded91
...
...
@@ -116,15 +116,18 @@ static ir_node *gen_Shr (ir_node *const node) { return gen_binop(node, &new_bd_a
static
ir_node
*
gen_Shrs
(
ir_node
*
const
node
)
{
return
gen_binop
(
node
,
&
new_bd_amd64_Sar
);
}
static
ir_node
*
gen_Sub
(
ir_node
*
const
node
)
{
return
gen_binop
(
node
,
&
new_bd_amd64_Sub
);
}
static
ir_node
*
gen_
Minus
(
ir_node
*
node
)
static
ir_node
*
gen_
unop
(
ir_node
*
const
node
,
ir_node
*
(
*
const
new_node
)(
dbg_info
*
,
ir_node
*
,
ir_node
*
)
)
{
ir_node
*
block
=
be_transform_node
(
get_nodes_block
(
node
));
ir_node
*
val
=
be_transform_node
(
get_Minus_op
(
node
));
dbg_info
*
dbgi
=
get_irn_dbg_info
(
node
);
dbg_info
*
const
dbgi
=
get_irn_dbg_info
(
node
);
ir_node
*
const
block
=
be_transform_node
(
get_nodes_block
(
node
));
ir_node
*
const
op
=
get_unop_op
(
node
);
ir_node
*
const
new_op
=
be_transform_node
(
op
);
return
new_
bd_amd64_Neg
(
dbgi
,
block
,
val
);
return
new_
node
(
dbgi
,
block
,
new_op
);
}
static
ir_node
*
gen_Minus
(
ir_node
*
const
node
)
{
return
gen_unop
(
node
,
&
new_bd_amd64_Neg
);
}
static
ir_node
*
gen_Jmp
(
ir_node
*
node
)
{
ir_node
*
block
=
get_nodes_block
(
node
);
...
...
Write
Preview
Supports
Markdown
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