Commit 28164eed by Richard Sandiford Committed by Richard Sandiford

expr.c (expand_expr_real_1): Use expand_insn for movmisalign.

gcc/
	* expr.c (expand_expr_real_1): Use expand_insn for movmisalign.

From-SVN: r176150
parent f3054223
2011-07-11 Richard Sandiford <richard.sandiford@linaro.org>
* expr.c (expand_expr_real_1): Use expand_insn for movmisalign.
2011-07-11 Arthur Loiret <aloiret@debian.org> 2011-07-11 Arthur Loiret <aloiret@debian.org>
* config.gcc (s390-*-linux*): If 'enabled_targets' is 'all', build * config.gcc (s390-*-linux*): If 'enabled_targets' is 'all', build
......
...@@ -8692,7 +8692,8 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, ...@@ -8692,7 +8692,8 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
{ {
addr_space_t as = TYPE_ADDR_SPACE (TREE_TYPE (exp)); addr_space_t as = TYPE_ADDR_SPACE (TREE_TYPE (exp));
struct mem_address addr; struct mem_address addr;
int icode, align; enum insn_code icode;
int align;
get_address_description (exp, &addr); get_address_description (exp, &addr);
op0 = addr_for_mem_ref (&addr, as, true); op0 = addr_for_mem_ref (&addr, as, true);
...@@ -8709,18 +8710,15 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, ...@@ -8709,18 +8710,15 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
&& ((icode = optab_handler (movmisalign_optab, mode)) && ((icode = optab_handler (movmisalign_optab, mode))
!= CODE_FOR_nothing)) != CODE_FOR_nothing))
{ {
rtx reg, insn; struct expand_operand ops[2];
/* We've already validated the memory, and we're creating a /* We've already validated the memory, and we're creating a
new pseudo destination. The predicates really can't fail. */ new pseudo destination. The predicates really can't fail,
reg = gen_reg_rtx (mode); nor can the generator. */
create_output_operand (&ops[0], NULL_RTX, mode);
/* Nor can the insn generator. */ create_fixed_operand (&ops[1], temp);
insn = GEN_FCN (icode) (reg, temp); expand_insn (icode, 2, ops);
gcc_assert (insn != NULL_RTX); return ops[0].value;
emit_insn (insn);
return reg;
} }
return temp; return temp;
} }
...@@ -8732,7 +8730,8 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, ...@@ -8732,7 +8730,8 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
enum machine_mode address_mode; enum machine_mode address_mode;
tree base = TREE_OPERAND (exp, 0); tree base = TREE_OPERAND (exp, 0);
gimple def_stmt; gimple def_stmt;
int icode, align; enum insn_code icode;
int align;
/* Handle expansion of non-aliased memory with non-BLKmode. That /* Handle expansion of non-aliased memory with non-BLKmode. That
might end up in a register. */ might end up in a register. */
if (TREE_CODE (base) == ADDR_EXPR) if (TREE_CODE (base) == ADDR_EXPR)
...@@ -8806,17 +8805,15 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, ...@@ -8806,17 +8805,15 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
&& ((icode = optab_handler (movmisalign_optab, mode)) && ((icode = optab_handler (movmisalign_optab, mode))
!= CODE_FOR_nothing)) != CODE_FOR_nothing))
{ {
rtx reg, insn; struct expand_operand ops[2];
/* We've already validated the memory, and we're creating a /* We've already validated the memory, and we're creating a
new pseudo destination. The predicates really can't fail. */ new pseudo destination. The predicates really can't fail,
reg = gen_reg_rtx (mode); nor can the generator. */
create_output_operand (&ops[0], NULL_RTX, mode);
/* Nor can the insn generator. */ create_fixed_operand (&ops[1], temp);
insn = GEN_FCN (icode) (reg, temp); expand_insn (icode, 2, ops);
emit_insn (insn); return ops[0].value;
return reg;
} }
return temp; return temp;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment