From: DJ Delorie Date: Fri, 21 Mar 2003 06:03:01 +0000 (-0500) Subject: stormy16.c (xstormy16_expand_arith): Make sure we always emit at least one insn. X-Git-Tag: releases/gcc-3.4.0~7774 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f3cd0185705330987114d311f0c3d9a172c543fb;p=thirdparty%2Fgcc.git stormy16.c (xstormy16_expand_arith): Make sure we always emit at least one insn. * config/stormy16/stormy16.c (xstormy16_expand_arith): Make sure we always emit at least one insn. From-SVN: r64644 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0931e8efb0bf..118ff21be71a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-03-21 DJ Delorie + + * config/stormy16/stormy16.c (xstormy16_expand_arith): Make + sure we always emit at least one insn. + 2003-03-21 Christopher Faylor * config.gcc (i[34567]86-*-cygwin*): Use new common makefile diff --git a/gcc/config/stormy16/stormy16.c b/gcc/config/stormy16/stormy16.c index 597c4ddaff26..9ab984d8209a 100644 --- a/gcc/config/stormy16/stormy16.c +++ b/gcc/config/stormy16/stormy16.c @@ -1971,6 +1971,11 @@ xstormy16_expand_arith (mode, code, dest, src0, src1, carry) firstloop = 0; emit (insn); } + + /* If we emit nothing, try_split() will think we failed. So emit + something that does nothing and can be optimized away. */ + if (firstloop) + emit (gen_nop ()); } /* Return 1 if OP is a shift operator. */