diff options
author | davem <davem@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-19 00:28:05 +0000 |
---|---|---|
committer | davem <davem@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-19 00:28:05 +0000 |
commit | e79a81b22df435c8f6165f4985f722574d0ead71 (patch) | |
tree | a81053762e9b4e7c6fb7d1ab13e1eb46a8703d7e /gcc/optabs.c | |
parent | e335475220cb50528dd43d1a88324e6b0061b3db (diff) | |
download | gcc-e79a81b22df435c8f6165f4985f722574d0ead71.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69578 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r-- | gcc/optabs.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c index 3085b8529ca..f8ae543024b 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -3725,7 +3725,12 @@ prepare_operand (int icode, rtx x, int opnum, enum machine_mode mode, if (! (*insn_data[icode].operand[opnum].predicate) (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; } @@ -5736,6 +5741,11 @@ gen_cond_trap (enum rtx_code code ATTRIBUTE_UNUSED, rtx op1, start_sequence (); op1 = prepare_operand (icode, op1, 0, 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)); PUT_CODE (trap_rtx, code); |