stormy16.c (xstormy16_expand_arith): Make sure we always emit at least one insn.
authorDJ Delorie <dj@redhat.com>
Fri, 21 Mar 2003 06:03:01 +0000 (01:03 -0500)
committerDJ Delorie <dj@gcc.gnu.org>
Fri, 21 Mar 2003 06:03:01 +0000 (01:03 -0500)
* config/stormy16/stormy16.c (xstormy16_expand_arith): Make
sure we always emit at least one insn.

From-SVN: r64644

gcc/ChangeLog
gcc/config/stormy16/stormy16.c

index 0931e8efb0bfb37e49a539da770f5ec36c057ad4..118ff21be71a7759d80a9fcb7a8ada79f7259218 100644 (file)
@@ -1,3 +1,8 @@
+2003-03-21  DJ Delorie  <dj@redhat.com>
+
+       * config/stormy16/stormy16.c (xstormy16_expand_arith): Make
+       sure we always emit at least one insn.
+
 2003-03-21  Christopher Faylor  <cgf@redhat.com>
 
        * config.gcc (i[34567]86-*-cygwin*): Use new common makefile
index 597c4ddaff26eddc19d00860934b4e9f30a95fee..9ab984d8209a8a14d721a80d98fcb812923346e3 100644 (file)
@@ -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.  */