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
c6e85785
Commit
c6e85785
authored
Oct 05, 2008
by
Christoph Mallon
Browse files
Clean up need_constraint_copy().
[r22503]
parent
1848b454
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/ia32/ia32_finish.c
View file @
c6e85785
...
...
@@ -208,18 +208,25 @@ static void ia32_transform_sub_to_neg_add(ir_node *irn, ia32_code_gen_t *cg) {
DBG_OPT_SUB2NEGADD
(
irn
,
res
);
}
static
INLINE
int
need_constraint_copy
(
ir_node
*
irn
)
{
/* the 3 operand form of IMul needs no constraint copy */
if
(
is_ia32_IMul
(
irn
))
{
ir_node
*
right
=
get_irn_n
(
irn
,
n_ia32_IMul_right
);
if
(
is_ia32_Immediate
(
right
))
static
INLINE
int
need_constraint_copy
(
ir_node
*
irn
)
{
/* TODO this should be determined from the node specification */
switch
(
get_ia32_irn_opcode
(
irn
))
{
case
iro_ia32_IMul
:
{
/* the 3 operand form of IMul needs no constraint copy */
ir_node
*
right
=
get_irn_n
(
irn
,
n_ia32_IMul_right
);
return
!
is_ia32_Immediate
(
right
);
}
case
iro_ia32_Lea
:
case
iro_ia32_Conv_I2I
:
case
iro_ia32_Conv_I2I8Bit
:
case
iro_ia32_CMov
:
return
0
;
}
return
!
is_ia32_Lea
(
irn
)
&&
!
is_ia32_Conv_I2I
(
irn
)
&&
!
is_ia32_Conv_I2I8Bit
(
irn
)
&&
!
is_ia32_CMov
(
irn
);
default:
return
1
;
}
}
/**
...
...
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