OSDN Git Service

2004-08-09 Paolo Bonzini <bonzini@gnu.org>
authorbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 10 Aug 2004 08:38:29 +0000 (08:38 +0000)
committerbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 10 Aug 2004 08:38:29 +0000 (08:38 +0000)
* expr.c (expand_expr_real_1): Add back code that was not dead.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85742 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/expr.c

index 6eb4be8..87045e6 100644 (file)
@@ -1,3 +1,7 @@
+2004-08-09  Paolo Bonzini  <bonzini@gnu.org>
+
+       * expr.c (expand_expr_real_1): Add back code that was not dead.
+
 2004-08-09  Andrew Pinski  <apinski@apple.com>
 
        * c-common.c (c_common_get_alias_set): Set the aliasing set of the type
 2004-08-09  Andrew Pinski  <apinski@apple.com>
 
        * c-common.c (c_common_get_alias_set): Set the aliasing set of the type
index 7334c59..607115b 100644 (file)
@@ -7778,6 +7778,32 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
          return temp;
        }
 
          return temp;
        }
 
+      /* If no set-flag instruction, must generate a conditional store
+        into a temporary variable.  Drop through and handle this
+        like && and ||.  */
+
+      if (! ignore
+         && (target == 0
+             || modifier == EXPAND_STACK_PARM
+             || ! safe_from_p (target, exp, 1)
+             /* Make sure we don't have a hard reg (such as function's return
+                value) live across basic blocks, if not optimizing.  */
+             || (!optimize && REG_P (target)
+                 && REGNO (target) < FIRST_PSEUDO_REGISTER)))
+       target = gen_reg_rtx (tmode != VOIDmode ? tmode : mode);
+
+      if (target)
+       emit_move_insn (target, const0_rtx);
+
+      op1 = gen_label_rtx ();
+      jumpifnot (exp, op1);
+
+      if (target)
+       emit_move_insn (target, const1_rtx);
+
+      emit_label (op1);
+      return ignore ? const0_rtx : target;
+
     case TRUTH_NOT_EXPR:
       if (modifier == EXPAND_STACK_PARM)
        target = 0;
     case TRUTH_NOT_EXPR:
       if (modifier == EXPAND_STACK_PARM)
        target = 0;