Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
99818db1
Commit
99818db1
authored
Jul 24, 2010
by
Michael Beck
Browse files
Improved MVN support.
[r27799]
parent
1de9ff0c
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/arm/arm_transform.c
View file @
99818db1
...
...
@@ -412,15 +412,13 @@ static ir_node *gen_int_binop(ir_node *node, match_flags_t flags,
const
arm_shifter_operand_t
*
attr
=
get_arm_shifter_operand_attr_const
(
new_op2
);
switch
(
attr
->
shift_modifier
)
{
ir_node
*
mov_op
,
*
mov_sft
;
case
ARM_SHF_IMM
:
case
ARM_SHF_ASR_IMM
:
case
ARM_SHF_LSL_IMM
:
case
ARM_SHF_LSR_IMM
:
case
ARM_SHF_ROR_IMM
:
if
(
factory
->
new_binop_reg_shift_imm
)
{
mov_op
=
get_irn_n
(
new_op2
,
0
);
ir_node
*
mov_op
=
get_irn_n
(
new_op2
,
0
);
return
factory
->
new_binop_reg_shift_imm
(
dbgi
,
block
,
new_op1
,
mov_op
,
attr
->
shift_modifier
,
attr
->
shift_immediate
);
}
...
...
@@ -431,8 +429,8 @@ static ir_node *gen_int_binop(ir_node *node, match_flags_t flags,
case
ARM_SHF_LSR_REG
:
case
ARM_SHF_ROR_REG
:
if
(
factory
->
new_binop_reg_shift_reg
)
{
mov_op
=
get_irn_n
(
new_op2
,
0
);
mov_sft
=
get_irn_n
(
new_op2
,
1
);
ir_node
*
mov_op
=
get_irn_n
(
new_op2
,
0
);
ir_node
*
mov_sft
=
get_irn_n
(
new_op2
,
1
);
return
factory
->
new_binop_reg_shift_reg
(
dbgi
,
block
,
new_op1
,
mov_op
,
mov_sft
,
attr
->
shift_modifier
);
}
...
...
@@ -824,7 +822,32 @@ static ir_node *gen_Not(ir_node *node)
ir_node
*
new_op
=
be_transform_node
(
op
);
dbg_info
*
dbgi
=
get_irn_dbg_info
(
node
);
/* TODO: we could do alot more here with all the Mvn variations */
/* check if we can fold in a Mov */
if
(
is_arm_Mov
(
new_op
))
{
const
arm_shifter_operand_t
*
attr
=
get_arm_shifter_operand_attr_const
(
new_op
);
switch
(
attr
->
shift_modifier
)
{
ir_node
*
mov_op
,
*
mov_sft
;
case
ARM_SHF_IMM
:
case
ARM_SHF_ASR_IMM
:
case
ARM_SHF_LSL_IMM
:
case
ARM_SHF_LSR_IMM
:
case
ARM_SHF_ROR_IMM
:
mov_op
=
get_irn_n
(
new_op
,
0
);
return
new_bd_arm_Mvn_reg_shift_imm
(
dbgi
,
block
,
mov_op
,
attr
->
shift_modifier
,
attr
->
shift_immediate
);
case
ARM_SHF_ASR_REG
:
case
ARM_SHF_LSL_REG
:
case
ARM_SHF_LSR_REG
:
case
ARM_SHF_ROR_REG
:
mov_op
=
get_irn_n
(
new_op
,
0
);
mov_sft
=
get_irn_n
(
new_op
,
1
);
return
new_bd_arm_Mvn_reg_shift_reg
(
dbgi
,
block
,
mov_op
,
mov_sft
,
attr
->
shift_modifier
);
}
}
return
new_bd_arm_Mvn_reg
(
dbgi
,
block
,
new_op
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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