re PR target/12070 (ICE converting between double and long double with -msoft-float)
PR target/12070 * calls.c (emit_library_call_value_1): Fix saving of BLKmode arguments. PR opt/12082 * cfgcleanup.c (try_simplify_condjump): Avoid unreachable code warning. From-SVN: r71147
This commit is contained in:
parent
0761f342c5
commit
9778f2f8b5
@ -1,3 +1,11 @@
|
||||
Sat Sep 6 23:49:13 CEST 2003 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
PR target/12070
|
||||
* calls.c (emit_library_call_value_1): Fix saving of BLKmode arguments.
|
||||
|
||||
PR opt/12082
|
||||
* cfgcleanup.c (try_simplify_condjump): Avoid unreachable code warning.
|
||||
|
||||
2003-09-06 Gabriel Dos Reis <gdr@integrable-solutions.net>
|
||||
|
||||
* diagnostic.c (announce_function): Move to toplev.c.
|
||||
|
42
gcc/calls.c
42
gcc/calls.c
@ -3071,10 +3071,19 @@ expand_call (tree exp, rtx target, int ignore)
|
||||
if (pass && (flags & ECF_LIBCALL_BLOCK))
|
||||
{
|
||||
rtx insns;
|
||||
rtx insn;
|
||||
bool failed = valreg == 0 || GET_CODE (valreg) == PARALLEL;
|
||||
|
||||
if (valreg == 0 || GET_CODE (valreg) == PARALLEL)
|
||||
insns = get_insns ();
|
||||
|
||||
/* Expansion of block moves possibly introduced a loop that may
|
||||
not appear inside libcall block. */
|
||||
for (insn = insns; insn; insn = NEXT_INSN (insn))
|
||||
if (GET_CODE (insn) == JUMP_INSN)
|
||||
failed = true;
|
||||
|
||||
if (failed)
|
||||
{
|
||||
insns = get_insns ();
|
||||
end_sequence ();
|
||||
emit_insn (insns);
|
||||
}
|
||||
@ -3095,7 +3104,6 @@ expand_call (tree exp, rtx target, int ignore)
|
||||
args[i].initial_value, note);
|
||||
note = gen_rtx_EXPR_LIST (VOIDmode, funexp, note);
|
||||
|
||||
insns = get_insns ();
|
||||
end_sequence ();
|
||||
|
||||
if (flags & ECF_PURE)
|
||||
@ -4008,9 +4016,25 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
|
||||
argvec[argnum].locate.offset.constant);
|
||||
rtx stack_area
|
||||
= gen_rtx_MEM (save_mode, memory_address (save_mode, adr));
|
||||
argvec[argnum].save_area = gen_reg_rtx (save_mode);
|
||||
|
||||
emit_move_insn (argvec[argnum].save_area, stack_area);
|
||||
if (save_mode == BLKmode)
|
||||
{
|
||||
argvec[argnum].save_area
|
||||
= assign_stack_temp (BLKmode,
|
||||
argvec[argnum].locate.size.constant,
|
||||
0);
|
||||
|
||||
emit_block_move (validize_mem (argvec[argnum].save_area),
|
||||
stack_area,
|
||||
GEN_INT (argvec[argnum].locate.size.constant),
|
||||
BLOCK_OP_CALL_PARM);
|
||||
}
|
||||
else
|
||||
{
|
||||
argvec[argnum].save_area = gen_reg_rtx (save_mode);
|
||||
|
||||
emit_move_insn (argvec[argnum].save_area, stack_area);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -4229,7 +4253,13 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
|
||||
rtx stack_area = gen_rtx_MEM (save_mode,
|
||||
memory_address (save_mode, adr));
|
||||
|
||||
emit_move_insn (stack_area, argvec[count].save_area);
|
||||
if (save_mode == BLKmode)
|
||||
emit_block_move (stack_area,
|
||||
validize_mem (argvec[count].save_area),
|
||||
GEN_INT (argvec[count].locate.size.constant),
|
||||
BLOCK_OP_CALL_PARM);
|
||||
else
|
||||
emit_move_insn (stack_area, argvec[count].save_area);
|
||||
}
|
||||
|
||||
highest_outgoing_arg_in_use = initial_highest_arg_in_use;
|
||||
|
@ -118,6 +118,8 @@ try_simplify_condjump (basic_block cbranch_block)
|
||||
basic_block jump_block, jump_dest_block, cbranch_dest_block;
|
||||
edge cbranch_jump_edge, cbranch_fallthru_edge;
|
||||
rtx cbranch_insn;
|
||||
rtx insn, next;
|
||||
rtx end;
|
||||
|
||||
/* Verify that there are exactly two successors. */
|
||||
if (!cbranch_block->succ
|
||||
@ -170,6 +172,20 @@ try_simplify_condjump (basic_block cbranch_block)
|
||||
cbranch_fallthru_edge->flags &= ~EDGE_FALLTHRU;
|
||||
update_br_prob_note (cbranch_block);
|
||||
|
||||
end = jump_block->end;
|
||||
/* Deleting a block may produce unreachable code warning even when we are
|
||||
not deleting anything live. Supress it by moving all the line number
|
||||
notes out of the block. */
|
||||
for (insn = jump_block->head; insn != NEXT_INSN (jump_block->end);
|
||||
insn = next)
|
||||
{
|
||||
next = NEXT_INSN (insn);
|
||||
if (GET_CODE (insn) == NOTE && NOTE_LINE_NUMBER (insn) > 0)
|
||||
{
|
||||
reorder_insns (insn, insn, end);
|
||||
end = insn;
|
||||
}
|
||||
}
|
||||
/* Delete the block with the unconditional jump, and clean up the mess. */
|
||||
delete_block (jump_block);
|
||||
tidy_fallthru_edge (cbranch_jump_edge, cbranch_block, cbranch_dest_block);
|
||||
|
Loading…
Reference in New Issue
Block a user