]> gcc.gnu.org Git - gcc.git/commitdiff
jcf-write.c (generate_bytecode_insns): Handle emitting iinc when result is is needed...
authorPer Bothner <per@bothner.com>
Sat, 17 Mar 2001 20:44:24 +0000 (12:44 -0800)
committerPer Bothner <bothner@gcc.gnu.org>
Sat, 17 Mar 2001 20:44:24 +0000 (12:44 -0800)
* jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
when result is is needed (target is STACK_TARGET).

From-SVN: r40585

gcc/java/ChangeLog
gcc/java/jcf-write.c

index 298cc4ca514289245fee71c94c4c67ec61d1c3e3..3b7193619589e70c3e5bc1bd1d0e7de134d588cf 100644 (file)
@@ -1,5 +1,8 @@
 2001-03-17  Per Bothner  <per@bothner.com>
 
+       * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
+       when result is is needed (target is STACK_TARGET).
+
        * parse.h (JDEP_SOLV):  Removed.
        * parse.y (incomplete_class_list):  Removed.
        (register_incomplete_type):  Use JDEP_TO_RESOLVE instead of JDEP_SOLV.
index 5cb4fb368a2b095b57c021af1efeecdaf2d21298..f819d835ad530e646ad9773b9cf5bbaf2da5b371 100644 (file)
@@ -2009,6 +2009,8 @@ generate_bytecode_insns (exp, target, state)
                    if (TREE_CODE (rhs) == MINUS_EXPR)
                      value = -value;
                    emit_iinc (lhs, value, state);
+                   if (target != IGNORE_TARGET)
+                     emit_load (lhs, state);
                    break;
                  }
              }
This page took 0.078278 seconds and 5 git commands to generate.