Commit d893ccde by Richard Henderson Committed by David S. Miller

optabs.c (prepare_operand): Fail gracefully instead of abort if the predicate doesn't satisfy.

2003-07-18  Richard Henderson  <rth@redhat.com>

	* optabs.c (prepare_operand): Fail gracefully instead of abort
	if the predicate doesn't satisfy.
	(gen_cond_trap): Allow prepare_operand to fail.

From-SVN: r69578
parent 3b1eae7b
2003-07-18 Richard Henderson <rth@redhat.com>
* optabs.c (prepare_operand): Fail gracefully instead of abort
if the predicate doesn't satisfy.
(gen_cond_trap): Allow prepare_operand to fail.
2003-07-19 Gabriel Dos Reis <gdr@integrable-solutions.net> 2003-07-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
* c-common.c: Don't undefine GCC_DIAG_STYLE. * c-common.c: Don't undefine GCC_DIAG_STYLE.
......
...@@ -3725,7 +3725,12 @@ prepare_operand (int icode, rtx x, int opnum, enum machine_mode mode, ...@@ -3725,7 +3725,12 @@ prepare_operand (int icode, rtx x, int opnum, enum machine_mode mode,
if (! (*insn_data[icode].operand[opnum].predicate) if (! (*insn_data[icode].operand[opnum].predicate)
(x, insn_data[icode].operand[opnum].mode)) (x, insn_data[icode].operand[opnum].mode))
x = copy_to_mode_reg (insn_data[icode].operand[opnum].mode, x); {
if (no_new_pseudos)
return NULL_RTX;
x = copy_to_mode_reg (insn_data[icode].operand[opnum].mode, x);
}
return x; return x;
} }
...@@ -5736,6 +5741,11 @@ gen_cond_trap (enum rtx_code code ATTRIBUTE_UNUSED, rtx op1, ...@@ -5736,6 +5741,11 @@ gen_cond_trap (enum rtx_code code ATTRIBUTE_UNUSED, rtx op1,
start_sequence (); start_sequence ();
op1 = prepare_operand (icode, op1, 0, mode, mode, 0); op1 = prepare_operand (icode, op1, 0, mode, mode, 0);
op2 = prepare_operand (icode, op2, 1, mode, mode, 0); op2 = prepare_operand (icode, op2, 1, mode, mode, 0);
if (!op1 || !op2)
{
end_sequence ();
return 0;
}
emit_insn (GEN_FCN (icode) (op1, op2)); emit_insn (GEN_FCN (icode) (op1, op2));
PUT_CODE (trap_rtx, code); PUT_CODE (trap_rtx, code);
......
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