diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-11 12:11:33 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-11 12:11:33 +0000 |
commit | 36eabf843c4a50216003779a7104960df515cf99 (patch) | |
tree | 83d2810d6f312e95977f7500df9f9abc47c713b7 /gcc/expr.c | |
parent | 5cd72ba2625ff31a8dddaa49abd01cde9862fd35 (diff) | |
download | gcc-36eabf843c4a50216003779a7104960df515cf99.tar.gz |
gcc/
* expr.c (expand_expr_real_1): Use expand_insn for movmisalign.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176150 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/gcc/expr.c b/gcc/expr.c index fb4379f8108..77039e8edaa 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -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)); struct mem_address addr; - int icode, align; + enum insn_code icode; + int align; get_address_description (exp, &addr); op0 = addr_for_mem_ref (&addr, as, true); @@ -8709,18 +8710,15 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, && ((icode = optab_handler (movmisalign_optab, mode)) != CODE_FOR_nothing)) { - rtx reg, insn; + struct expand_operand ops[2]; /* We've already validated the memory, and we're creating a - new pseudo destination. The predicates really can't fail. */ - reg = gen_reg_rtx (mode); - - /* Nor can the insn generator. */ - insn = GEN_FCN (icode) (reg, temp); - gcc_assert (insn != NULL_RTX); - emit_insn (insn); - - return reg; + new pseudo destination. The predicates really can't fail, + nor can the generator. */ + create_output_operand (&ops[0], NULL_RTX, mode); + create_fixed_operand (&ops[1], temp); + expand_insn (icode, 2, ops); + return ops[0].value; } return temp; } @@ -8732,7 +8730,8 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, enum machine_mode address_mode; tree base = TREE_OPERAND (exp, 0); gimple def_stmt; - int icode, align; + enum insn_code icode; + int align; /* Handle expansion of non-aliased memory with non-BLKmode. That might end up in a register. */ if (TREE_CODE (base) == ADDR_EXPR) @@ -8806,17 +8805,15 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, && ((icode = optab_handler (movmisalign_optab, mode)) != CODE_FOR_nothing)) { - rtx reg, insn; + struct expand_operand ops[2]; /* We've already validated the memory, and we're creating a - new pseudo destination. The predicates really can't fail. */ - reg = gen_reg_rtx (mode); - - /* Nor can the insn generator. */ - insn = GEN_FCN (icode) (reg, temp); - emit_insn (insn); - - return reg; + new pseudo destination. The predicates really can't fail, + nor can the generator. */ + create_output_operand (&ops[0], NULL_RTX, mode); + create_fixed_operand (&ops[1], temp); + expand_insn (icode, 2, ops); + return ops[0].value; } return temp; } |