]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
builtins.c (expand_builtin_mathfn): Use EXPAND_NORMAL instead of 0 in the call to...
authorUros Bizjak <ubizjak@gmail.com>
Mon, 14 May 2007 19:42:47 +0000 (21:42 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Mon, 14 May 2007 19:42:47 +0000 (21:42 +0200)
        * builtins.c (expand_builtin_mathfn): Use EXPAND_NORMAL instead
        of 0 in the call to expand_expr().
        (expand_builtin_mathfn_3): Ditto.
        (expand_builtin_interclass_mathfn): Ditto.
        (expand_builtin_cexpi): Ditto.
        (expand_builtin_int_roundingfn): Ditto.
        (expand_builtin_int_roundingfn_2): Ditto.
        (expand_builtin_pow): Ditto.
        (expand_builtin_powi): Ditto.
        (expand_builtin_bswap): Ditto.
        (expand_builtin_unop): Ditto.
        (expand_builtin_fabs): Ditto.
        (get_builtin_sync_mem): Use NULL_RTX instead of NULL in
        the call to expand_expr().
        (expand_builtin_sync_operation): Ditto.
        (expand_builtin_compare_and_swap): Ditto.
        (expand_builtin_lock_test_and_set): Ditto.
        * except.c (expand_builtin_eh_return_data_regno): Use EXPAND_NORMAL
        instead of 0 in the call to expand_expr().
        (expand_builtin_extract_return_addr): Ditto.
        (expand_builtin_eh_return): Ditto.
        (expand_eh_return): Ditto.
        * explow.c (expr_size): Ditto.
        * expr.c (optimize_bitfield_assignment_op): Ditto.
        (expand_assignement): Ditto.
        (store_expr): Ditto.
        (store_field): Ditto.
        (expand_expr_addr_expr_1): Use NULL_RTX instead of NULL in
        the call to expand_expr().
        (expand_expr_real_1) [COMPLEX_CST]: Use EXPAND_NORMAL instead of 0
        in the call to expand_expr().
        [CONSTRUCTOR, PLUS_EXPR, MINUS_EXPR, NEGATE_EXPR, ABS_EXPR,
        BIT_NOT_EXPR, LSHIFT_EXPR, LT_EXPR, TRUTH_NOT_EXPR]: Ditto.
        [VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO]: Use expand_normal() instead
        of expand_expr().
        * optabs.c (expand_vec_shift_expr): Ditto.
        (expand_vec_cond_expr): Ditto.
        (vector_compare_rtx): Use EXPAND_STACK_PARM instead of 1 in the
        call to expand_expr().
        * stmt.c (expand_return): Use EXPAND_NORMAL instead of 0
        in the call to expand_expr().

From-SVN: r124722

gcc/ChangeLog
gcc/builtins.c
gcc/except.c
gcc/explow.c
gcc/expr.c
gcc/optabs.c
gcc/stmt.c

index 3e70d9882017110123924d62f361b92b198369cf..21bb78ed790bdaae929c8ebd0a22270af6c550a9 100644 (file)
@@ -1,3 +1,47 @@
+2007-05-14  Uros Bizjak  <ubizjak@gmail.com>
+
+       * builtins.c (expand_builtin_mathfn): Use EXPAND_NORMAL instead
+       of 0 in the call to expand_expr().
+       (expand_builtin_mathfn_3): Ditto.
+       (expand_builtin_interclass_mathfn): Ditto.
+       (expand_builtin_cexpi): Ditto.
+       (expand_builtin_int_roundingfn): Ditto.
+       (expand_builtin_int_roundingfn_2): Ditto.
+       (expand_builtin_pow): Ditto.
+       (expand_builtin_powi): Ditto.
+       (expand_builtin_bswap): Ditto.
+       (expand_builtin_unop): Ditto.
+       (expand_builtin_fabs): Ditto.
+       (get_builtin_sync_mem): Use NULL_RTX instead of NULL in
+       the call to expand_expr().
+       (expand_builtin_sync_operation): Ditto.
+       (expand_builtin_compare_and_swap): Ditto.
+       (expand_builtin_lock_test_and_set): Ditto.
+       * except.c (expand_builtin_eh_return_data_regno): Use EXPAND_NORMAL
+       instead of 0 in the call to expand_expr().
+       (expand_builtin_extract_return_addr): Ditto.
+       (expand_builtin_eh_return): Ditto.
+       (expand_eh_return): Ditto.
+       * explow.c (expr_size): Ditto.
+       * expr.c (optimize_bitfield_assignment_op): Ditto.
+       (expand_assignement): Ditto.
+       (store_expr): Ditto.
+       (store_field): Ditto.
+       (expand_expr_addr_expr_1): Use NULL_RTX instead of NULL in
+       the call to expand_expr().
+       (expand_expr_real_1) [COMPLEX_CST]: Use EXPAND_NORMAL instead of 0
+       in the call to expand_expr().
+       [CONSTRUCTOR, PLUS_EXPR, MINUS_EXPR, NEGATE_EXPR, ABS_EXPR,
+       BIT_NOT_EXPR, LSHIFT_EXPR, LT_EXPR, TRUTH_NOT_EXPR]: Ditto.
+       [VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO]: Use expand_normal() instead
+       of expand_expr().
+       * optabs.c (expand_vec_shift_expr): Ditto.
+       (expand_vec_cond_expr): Ditto.
+       (vector_compare_rtx): Use EXPAND_STACK_PARM instead of 1 in the
+       call to expand_expr().
+       * stmt.c (expand_return): Use EXPAND_NORMAL instead of 0
+       in the call to expand_expr().
+
 2007-05-14  Dave Korn  <dave.korn@artimi.com>
 
        * genautomata.c (gen_regexp_el):  Allocate correct size for regexp.
index 48c0cc0871ffab6b5b4ad75fff89b7b7a944c116..2de66dd4f60db67b77588f46e18b4e2df6f90913 100644 (file)
@@ -1884,7 +1884,7 @@ expand_builtin_mathfn (tree exp, rtx target, rtx subtarget)
          exp = build_call_expr (fndecl, 1, arg);
        }
 
-      op0 = expand_expr (arg, subtarget, VOIDmode, 0);
+      op0 = expand_expr (arg, subtarget, VOIDmode, EXPAND_NORMAL);
 
       start_sequence ();
 
@@ -2137,7 +2137,7 @@ expand_builtin_mathfn_3 (tree exp, rtx target, rtx subtarget)
          exp = build_call_expr (fndecl, 1, arg);
        }
 
-      op0 = expand_expr (arg, subtarget, VOIDmode, 0);
+      op0 = expand_expr (arg, subtarget, VOIDmode, EXPAND_NORMAL);
 
       start_sequence ();
 
@@ -2249,7 +2249,7 @@ expand_builtin_interclass_mathfn (tree exp, rtx target, rtx subtarget)
          exp = build_call_expr (fndecl, 1, arg);
        }
 
-      op0 = expand_expr (arg, subtarget, VOIDmode, 0);
+      op0 = expand_expr (arg, subtarget, VOIDmode, EXPAND_NORMAL);
 
       if (mode != GET_MODE (op0))
        op0 = convert_to_mode (mode, op0, 0);
@@ -2341,7 +2341,7 @@ expand_builtin_cexpi (tree exp, rtx target, rtx subtarget)
       op1 = gen_reg_rtx (mode);
       op2 = gen_reg_rtx (mode);
 
-      op0 = expand_expr (arg, subtarget, VOIDmode, 0);
+      op0 = expand_expr (arg, subtarget, VOIDmode, EXPAND_NORMAL);
 
       /* Compute into op1 and op2.  */
       expand_twoval_unop (sincos_optab, op0, op2, op1, 0);
@@ -2412,14 +2412,14 @@ expand_builtin_cexpi (tree exp, rtx target, rtx subtarget)
       /* Make sure not to fold the cexp call again.  */
       call = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (fn)), fn);
       return expand_expr (build_call_nary (ctype, call, 1, narg), 
-                         target, VOIDmode, 0);
+                         target, VOIDmode, EXPAND_NORMAL);
     }
 
   /* Now build the proper return type.  */
   return expand_expr (build2 (COMPLEX_EXPR, build_complex_type (type),
                              make_tree (TREE_TYPE (arg), op2),
                              make_tree (TREE_TYPE (arg), op1)),
-                     target, VOIDmode, 0);
+                     target, VOIDmode, EXPAND_NORMAL);
 }
 
 /* Expand a call to one of the builtin rounding functions gcc defines
@@ -2479,7 +2479,7 @@ expand_builtin_int_roundingfn (tree exp, rtx target, rtx subtarget)
       exp = build_call_expr (fndecl, 1, arg);
     }
 
-  op0 = expand_expr (arg, subtarget, VOIDmode, 0);
+  op0 = expand_expr (arg, subtarget, VOIDmode, EXPAND_NORMAL);
 
   start_sequence ();
 
@@ -2608,7 +2608,7 @@ expand_builtin_int_roundingfn_2 (tree exp, rtx target, rtx subtarget)
       exp = build_call_expr (fndecl, 1, arg);
     }
 
-  op0 = expand_expr (arg, subtarget, VOIDmode, 0);
+  op0 = expand_expr (arg, subtarget, VOIDmode, EXPAND_NORMAL);
 
   start_sequence ();
 
@@ -2875,7 +2875,7 @@ expand_builtin_pow (tree exp, rtx target, rtx subtarget)
              && !optimize_size
              && powi_cost (n) <= POWI_MAX_MULTS)))
     {
-      op = expand_expr (arg0, subtarget, VOIDmode, 0);
+      op = expand_expr (arg0, subtarget, VOIDmode, EXPAND_NORMAL);
       if (n != 1)
        {
          op = force_reg (mode, op);
@@ -2904,7 +2904,7 @@ expand_builtin_pow (tree exp, rtx target, rtx subtarget)
          op = expand_builtin (call_expr, NULL_RTX, subtarget, mode, 0);
          if (n != 1)
            {
-             op2 = expand_expr (narg0, subtarget, VOIDmode, 0);
+             op2 = expand_expr (narg0, subtarget, VOIDmode, EXPAND_NORMAL);
              op2 = force_reg (mode, op2);
              op2 = expand_powi (op2, mode, abs (n / 2));
              op = expand_simple_binop (mode, MULT, op, op2, NULL_RTX,
@@ -2948,7 +2948,7 @@ expand_builtin_pow (tree exp, rtx target, rtx subtarget)
                                      0, OPTAB_LIB_WIDEN);
          if (n != 1)
            {
-             op2 = expand_expr (narg0, subtarget, VOIDmode, 0);
+             op2 = expand_expr (narg0, subtarget, VOIDmode, EXPAND_NORMAL);
              op2 = force_reg (mode, op2);
              op2 = expand_powi (op2, mode, abs (n / 3));
              op = expand_simple_binop (mode, MULT, op, op2, NULL_RTX,
@@ -3002,7 +3002,7 @@ expand_builtin_powi (tree exp, rtx target, rtx subtarget)
              || (! optimize_size
                  && powi_cost (n) <= POWI_MAX_MULTS)))
        {
-         op0 = expand_expr (arg0, subtarget, VOIDmode, 0);
+         op0 = expand_expr (arg0, subtarget, VOIDmode, EXPAND_NORMAL);
          op0 = force_reg (mode, op0);
          return expand_powi (op0, mode, n);
        }
@@ -3016,10 +3016,10 @@ expand_builtin_powi (tree exp, rtx target, rtx subtarget)
   if (target == NULL_RTX)
     target = gen_reg_rtx (mode);
 
-  op0 = expand_expr (arg0, subtarget, mode, 0);
+  op0 = expand_expr (arg0, subtarget, mode, EXPAND_NORMAL);
   if (GET_MODE (op0) != mode)
     op0 = convert_to_mode (mode, op0, 0);
-  op1 = expand_expr (arg1, 0, mode2, 0);
+  op1 = expand_expr (arg1, NULL_RTX, mode2, EXPAND_NORMAL);
   if (GET_MODE (op1) != mode2)
     op1 = convert_to_mode (mode2, op1, 0);
 
@@ -5039,7 +5039,7 @@ expand_builtin_bswap (tree exp, rtx target, rtx subtarget)
 
   arg = CALL_EXPR_ARG (exp, 0);
   mode = TYPE_MODE (TREE_TYPE (arg));
-  op0 = expand_expr (arg, subtarget, VOIDmode, 0);
+  op0 = expand_expr (arg, subtarget, VOIDmode, EXPAND_NORMAL);
 
   target = expand_unop (mode, bswap_optab, op0, target, 1);
 
@@ -5063,7 +5063,8 @@ expand_builtin_unop (enum machine_mode target_mode, tree exp, rtx target,
     return NULL_RTX;
 
   /* Compute the argument.  */
-  op0 = expand_expr (CALL_EXPR_ARG (exp, 0), subtarget, VOIDmode, 0);
+  op0 = expand_expr (CALL_EXPR_ARG (exp, 0), subtarget,
+                    VOIDmode, EXPAND_NORMAL);
   /* Compute op, into TARGET if possible.
      Set TARGET to wherever the result comes back.  */
   target = expand_unop (TYPE_MODE (TREE_TYPE (CALL_EXPR_ARG (exp, 0))),
@@ -5142,7 +5143,7 @@ expand_builtin_fabs (tree exp, rtx target, rtx subtarget)
 
   arg = CALL_EXPR_ARG (exp, 0);
   mode = TYPE_MODE (TREE_TYPE (arg));
-  op0 = expand_expr (arg, subtarget, VOIDmode, 0);
+  op0 = expand_expr (arg, subtarget, VOIDmode, EXPAND_NORMAL);
   return expand_abs (mode, op0, target, 0, safe_from_p (target, arg, 1));
 }
 
@@ -5766,7 +5767,7 @@ get_builtin_sync_mem (tree loc, enum machine_mode mode)
 {
   rtx addr, mem;
 
-  addr = expand_expr (loc, NULL, Pmode, EXPAND_SUM);
+  addr = expand_expr (loc, NULL_RTX, Pmode, EXPAND_SUM);
 
   /* Note that we explicitly do not want any alias information for this
      memory, so that we kill all other live memories.  Otherwise we don't
@@ -5799,7 +5800,7 @@ expand_builtin_sync_operation (enum machine_mode mode, tree exp,
   /* Expand the operands.  */
   mem = get_builtin_sync_mem (CALL_EXPR_ARG (exp, 0), mode);
 
-  val = expand_expr (CALL_EXPR_ARG (exp, 1), NULL, mode, EXPAND_NORMAL);
+  val = expand_expr (CALL_EXPR_ARG (exp, 1), NULL_RTX, mode, EXPAND_NORMAL);
   /* If VAL is promoted to a wider mode, convert it back to MODE.  Take care
      of CONST_INTs, where we know the old_mode only from the call argument.  */
   old_mode = GET_MODE (val);
@@ -5829,7 +5830,8 @@ expand_builtin_compare_and_swap (enum machine_mode mode, tree exp,
   mem = get_builtin_sync_mem (CALL_EXPR_ARG (exp, 0), mode);
 
 
-  old_val = expand_expr (CALL_EXPR_ARG (exp, 1), NULL, mode, EXPAND_NORMAL);
+  old_val = expand_expr (CALL_EXPR_ARG (exp, 1), NULL_RTX,
+                        mode, EXPAND_NORMAL);
   /* If VAL is promoted to a wider mode, convert it back to MODE.  Take care
      of CONST_INTs, where we know the old_mode only from the call argument.  */
   old_mode = GET_MODE (old_val);
@@ -5837,7 +5839,8 @@ expand_builtin_compare_and_swap (enum machine_mode mode, tree exp,
     old_mode = TYPE_MODE (TREE_TYPE (CALL_EXPR_ARG (exp, 1)));
   old_val = convert_modes (mode, old_mode, old_val, 1);
 
-  new_val = expand_expr (CALL_EXPR_ARG (exp, 2), NULL, mode, EXPAND_NORMAL);
+  new_val = expand_expr (CALL_EXPR_ARG (exp, 2), NULL_RTX,
+                        mode, EXPAND_NORMAL);
   /* If VAL is promoted to a wider mode, convert it back to MODE.  Take care
      of CONST_INTs, where we know the old_mode only from the call argument.  */
   old_mode = GET_MODE (new_val);
@@ -5866,7 +5869,7 @@ expand_builtin_lock_test_and_set (enum machine_mode mode, tree exp,
 
   /* Expand the operands.  */
   mem = get_builtin_sync_mem (CALL_EXPR_ARG (exp, 0), mode);
-  val = expand_expr (CALL_EXPR_ARG (exp, 1), NULL, mode, EXPAND_NORMAL);
+  val = expand_expr (CALL_EXPR_ARG (exp, 1), NULL_RTX, mode, EXPAND_NORMAL);
   /* If VAL is promoted to a wider mode, convert it back to MODE.  Take care
      of CONST_INTs, where we know the old_mode only from the call argument.  */
   old_mode = GET_MODE (val);
index e6c1b48f49a8792904b0e43c510137e041694209..c360ef7f5609c7146e7fa5966d2cf76a38d94a7b 100644 (file)
@@ -2898,7 +2898,7 @@ expand_builtin_eh_return_data_regno (tree exp)
 rtx
 expand_builtin_extract_return_addr (tree addr_tree)
 {
-  rtx addr = expand_expr (addr_tree, NULL_RTX, Pmode, 0);
+  rtx addr = expand_expr (addr_tree, NULL_RTX, Pmode, EXPAND_NORMAL);
 
   if (GET_MODE (addr) != Pmode
       && GET_MODE (addr) != VOIDmode)
@@ -2930,7 +2930,7 @@ expand_builtin_extract_return_addr (tree addr_tree)
 rtx
 expand_builtin_frob_return_addr (tree addr_tree)
 {
-  rtx addr = expand_expr (addr_tree, NULL_RTX, ptr_mode, 0);
+  rtx addr = expand_expr (addr_tree, NULL_RTX, ptr_mode, EXPAND_NORMAL);
 
   addr = convert_memory_address (Pmode, addr);
 
@@ -2952,7 +2952,8 @@ expand_builtin_eh_return (tree stackadj_tree ATTRIBUTE_UNUSED,
   rtx tmp;
 
 #ifdef EH_RETURN_STACKADJ_RTX
-  tmp = expand_expr (stackadj_tree, cfun->eh->ehr_stackadj, VOIDmode, 0);
+  tmp = expand_expr (stackadj_tree, cfun->eh->ehr_stackadj,
+                    VOIDmode, EXPAND_NORMAL);
   tmp = convert_memory_address (Pmode, tmp);
   if (!cfun->eh->ehr_stackadj)
     cfun->eh->ehr_stackadj = copy_to_reg (tmp);
@@ -2960,7 +2961,8 @@ expand_builtin_eh_return (tree stackadj_tree ATTRIBUTE_UNUSED,
     emit_move_insn (cfun->eh->ehr_stackadj, tmp);
 #endif
 
-  tmp = expand_expr (handler_tree, cfun->eh->ehr_handler, VOIDmode, 0);
+  tmp = expand_expr (handler_tree, cfun->eh->ehr_handler,
+                    VOIDmode, EXPAND_NORMAL);
   tmp = convert_memory_address (Pmode, tmp);
   if (!cfun->eh->ehr_handler)
     cfun->eh->ehr_handler = copy_to_reg (tmp);
@@ -3018,7 +3020,7 @@ expand_eh_return (void)
 rtx
 expand_builtin_extend_pointer (tree addr_tree)
 {
-  rtx addr = expand_expr (addr_tree, NULL_RTX, ptr_mode, 0);
+  rtx addr = expand_expr (addr_tree, NULL_RTX, ptr_mode, EXPAND_NORMAL);
   int extend;
 
 #ifdef POINTERS_EXTEND_UNSIGNED
index b2d4f52969bf48be9cc2fbc3687337e6dfcbdee6..79ba5c7e2919c1ae6f5dec628c1040cc81607c90 100644 (file)
@@ -251,7 +251,7 @@ expr_size (tree exp)
       size = SUBSTITUTE_PLACEHOLDER_IN_EXPR (size, exp);
     }
 
-  return expand_expr (size, NULL_RTX, TYPE_MODE (sizetype), 0);
+  return expand_expr (size, NULL_RTX, TYPE_MODE (sizetype), EXPAND_NORMAL);
 }
 
 /* Return a wide integer for the size in bytes of the value of EXP, or -1
index ce26ba63a2df4a8f24f394c2fbddf94fbe6c2195..846c9f696ee27accd4db499fadc3a89264325804 100644 (file)
@@ -3995,7 +3995,7 @@ optimize_bitfield_assignment_op (unsigned HOST_WIDE_INT bitsize,
          && (bitsize != 1 || TREE_CODE (op1) != INTEGER_CST))
        break;
 
-      value = expand_expr (op1, NULL_RTX, str_mode, 0);
+      value = expand_expr (op1, NULL_RTX, str_mode, EXPAND_NORMAL);
       value = convert_modes (str_mode,
                             TYPE_MODE (TREE_TYPE (op1)), value,
                             TYPE_UNSIGNED (TREE_TYPE (op1)));
@@ -4028,7 +4028,7 @@ optimize_bitfield_assignment_op (unsigned HOST_WIDE_INT bitsize,
     case BIT_XOR_EXPR:
       if (TREE_CODE (op1) != INTEGER_CST)
        break;
-      value = expand_expr (op1, NULL_RTX, GET_MODE (str_rtx), 0);
+      value = expand_expr (op1, NULL_RTX, GET_MODE (str_rtx), EXPAND_NORMAL);
       value = convert_modes (GET_MODE (str_rtx),
                             TYPE_MODE (TREE_TYPE (op1)), value,
                             TYPE_UNSIGNED (TREE_TYPE (op1)));
@@ -4252,7 +4252,7 @@ expand_assignment (tree to, tree from)
       rtx temp;
 
       push_temp_slots ();
-      temp = expand_expr (from, 0, GET_MODE (to_rtx), 0);
+      temp = expand_expr (from, NULL_RTX, GET_MODE (to_rtx), EXPAND_NORMAL);
 
       if (GET_CODE (to_rtx) == PARALLEL)
        emit_group_load (to_rtx, temp, TREE_TYPE (from),
@@ -4328,7 +4328,7 @@ store_expr (tree exp, rtx target, int call_param_p)
         branch and an rvalue in the other. Here, we resolve attempts to
         store the throw expression's nonexistent result.  */
       gcc_assert (!call_param_p);
-      expand_expr (exp, const0_rtx, VOIDmode, 0);
+      expand_expr (exp, const0_rtx, VOIDmode, EXPAND_NORMAL);
       return NULL_RTX;
     }
   if (TREE_CODE (exp) == COMPOUND_EXPR)
@@ -5524,7 +5524,7 @@ store_field (rtx target, HOST_WIDE_INT bitsize, HOST_WIDE_INT bitpos,
   /* If we have nothing to store, do nothing unless the expression has
      side-effects.  */
   if (bitsize == 0)
-    return expand_expr (exp, const0_rtx, VOIDmode, 0);
+    return expand_expr (exp, const0_rtx, VOIDmode, EXPAND_NORMAL);
   else if (bitsize >= 0 && bitsize < HOST_BITS_PER_WIDE_INT)
     width_mask = ((HOST_WIDE_INT) 1 << bitsize) - 1;
 
@@ -6630,7 +6630,7 @@ expand_expr_addr_expr_1 (tree exp, rtx target, enum machine_mode tmode,
 
       if (modifier != EXPAND_NORMAL)
        result = force_operand (result, NULL);
-      tmp = expand_expr (offset, NULL, tmode, EXPAND_NORMAL);
+      tmp = expand_expr (offset, NULL_RTX, tmode, EXPAND_NORMAL);
 
       result = convert_memory_address (tmode, result);
       tmp = convert_memory_address (tmode, tmp);
@@ -7111,8 +7111,8 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
          itarg = XEXP (original_target, 1);
 
          /* Move the real and imaginary parts separately.  */
-         op0 = expand_expr (TREE_REALPART (exp), rtarg, mode, 0);
-         op1 = expand_expr (TREE_IMAGPART (exp), itarg, mode, 0);
+         op0 = expand_expr (TREE_REALPART (exp), rtarg, mode, EXPAND_NORMAL);
+         op1 = expand_expr (TREE_IMAGPART (exp), itarg, mode, EXPAND_NORMAL);
 
          if (op0 != rtarg)
            emit_move_insn (rtarg, op0);
@@ -7182,7 +7182,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
          tree value;
 
          FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (exp), idx, value)
-           expand_expr (value, const0_rtx, VOIDmode, 0);
+           expand_expr (value, const0_rtx, VOIDmode, EXPAND_NORMAL);
 
          return const0_rtx;
        }
@@ -8010,7 +8010,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
                                   TREE_OPERAND (subsubexp1, 0),
                                   NULL_RTX, &op0, &op1, EXPAND_NORMAL);
                  op2 = expand_expr (TREE_OPERAND (exp, 1), subtarget,
-                                    VOIDmode, 0);
+                                    VOIDmode, EXPAND_NORMAL);
                  temp = expand_ternary_op (mode, this_optab, op0, op1, op2,
                                            target, unsignedp);
                  gcc_assert (temp);
@@ -8165,7 +8165,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
                                   TREE_OPERAND (subsubexp1, 0),
                                   NULL_RTX, &op0, &op1, EXPAND_NORMAL);
                  op2 = expand_expr (TREE_OPERAND (exp, 0), subtarget,
-                                    VOIDmode, 0);
+                                    VOIDmode, EXPAND_NORMAL);
                  temp = expand_ternary_op (mode, this_optab, op0, op1, op2,
                                            target, unsignedp);
                  gcc_assert (temp);
@@ -8410,7 +8410,8 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
       return target;
 
     case NEGATE_EXPR:
-      op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, 0);
+      op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget,
+                        VOIDmode, EXPAND_NORMAL);
       if (modifier == EXPAND_STACK_PARM)
        target = 0;
       temp = expand_unop (mode,
@@ -8420,7 +8421,8 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
       return REDUCE_BIT_FIELD (temp);
 
     case ABS_EXPR:
-      op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, 0);
+      op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget,
+                        VOIDmode, EXPAND_NORMAL);
       if (modifier == EXPAND_STACK_PARM)
        target = 0;
 
@@ -8552,7 +8554,8 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
       return target;
 
     case BIT_NOT_EXPR:
-      op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, 0);
+      op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget,
+                        VOIDmode, EXPAND_NORMAL);
       if (modifier == EXPAND_STACK_PARM)
        target = 0;
       temp = expand_unop (mode, one_cmpl_optab, op0, target, 1);
@@ -8595,7 +8598,8 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
        subtarget = 0;
       if (modifier == EXPAND_STACK_PARM)
        target = 0;
-      op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, 0);
+      op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget,
+                        VOIDmode, EXPAND_NORMAL);
       return expand_shift (code, mode, op0, TREE_OPERAND (exp, 1), target,
                           unsignedp);
 
@@ -8629,7 +8633,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
              == TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0)))))
        {
          temp = expand_expr (TREE_OPERAND (exp, 0), original_target,
-                             VOIDmode, 0);
+                             VOIDmode, EXPAND_NORMAL);
 
          /* If temp is constant, we can just compute the result.  */
          if (GET_CODE (temp) == CONST_INT)
@@ -8688,7 +8692,8 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
     case TRUTH_NOT_EXPR:
       if (modifier == EXPAND_STACK_PARM)
        target = 0;
-      op0 = expand_expr (TREE_OPERAND (exp, 0), target, VOIDmode, 0);
+      op0 = expand_expr (TREE_OPERAND (exp, 0), target,
+                        VOIDmode, EXPAND_NORMAL);
       /* The parser is careful to generate TRUTH_NOT_EXPR
         only with operands that are always zero or one.  */
       temp = expand_binop (mode, xor_optab, op0, const1_rtx,
@@ -8988,7 +8993,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
     case VEC_UNPACK_HI_EXPR:
     case VEC_UNPACK_LO_EXPR:
       {
-       op0 = expand_expr (TREE_OPERAND (exp, 0), NULL_RTX, VOIDmode, 0);
+       op0 = expand_normal (TREE_OPERAND (exp, 0));
        this_optab = optab_for_tree_code (code, type);
        temp = expand_widen_pattern_expr (exp, op0, NULL_RTX, NULL_RTX,
                                          target, unsignedp);
index 416c4d43e9b36c5c0e8d7dfa26fd6858539209ef..ef58aee11a8f28e45912558eccea1334d4fb25c1 100644 (file)
@@ -684,12 +684,12 @@ expand_vec_shift_expr (tree vec_shift_expr, rtx target)
   mode1 = insn_data[icode].operand[1].mode;
   mode2 = insn_data[icode].operand[2].mode;
 
-  rtx_op1 = expand_expr (vec_oprnd, NULL_RTX, VOIDmode, EXPAND_NORMAL);
+  rtx_op1 = expand_normal (vec_oprnd);
   if (!(*insn_data[icode].operand[1].predicate) (rtx_op1, mode1)
       && mode1 != VOIDmode)
     rtx_op1 = force_reg (mode1, rtx_op1);
 
-  rtx_op2 = expand_expr (shift_oprnd, NULL_RTX, VOIDmode, EXPAND_NORMAL);
+  rtx_op2 = expand_normal (shift_oprnd);
   if (!(*insn_data[icode].operand[2].predicate) (rtx_op2, mode2)
       && mode2 != VOIDmode)
     rtx_op2 = force_reg (mode2, rtx_op2);
@@ -5950,8 +5950,10 @@ vector_compare_rtx (tree cond, bool unsignedp, enum insn_code icode)
   t_op1 = TREE_OPERAND (cond, 1);
 
   /* Expand operands.  */
-  rtx_op0 = expand_expr (t_op0, NULL_RTX, TYPE_MODE (TREE_TYPE (t_op0)), 1);
-  rtx_op1 = expand_expr (t_op1, NULL_RTX, TYPE_MODE (TREE_TYPE (t_op1)), 1);
+  rtx_op0 = expand_expr (t_op0, NULL_RTX, TYPE_MODE (TREE_TYPE (t_op0)),
+                        EXPAND_STACK_PARM);
+  rtx_op1 = expand_expr (t_op1, NULL_RTX, TYPE_MODE (TREE_TYPE (t_op1)),
+                        EXPAND_STACK_PARM);
 
   if (!insn_data[icode].operand[4].predicate (rtx_op0, GET_MODE (rtx_op0))
       && GET_MODE (rtx_op0) != VOIDmode)
@@ -6012,14 +6014,12 @@ expand_vec_cond_expr (tree vec_cond_expr, rtx target)
   cc_op0 = XEXP (comparison, 0);
   cc_op1 = XEXP (comparison, 1);
   /* Expand both operands and force them in reg, if required.  */
-  rtx_op1 = expand_expr (TREE_OPERAND (vec_cond_expr, 1),
-                        NULL_RTX, VOIDmode, EXPAND_NORMAL);
+  rtx_op1 = expand_normal (TREE_OPERAND (vec_cond_expr, 1));
   if (!insn_data[icode].operand[1].predicate (rtx_op1, mode)
       && mode != VOIDmode)
     rtx_op1 = force_reg (mode, rtx_op1);
 
-  rtx_op2 = expand_expr (TREE_OPERAND (vec_cond_expr, 2),
-                        NULL_RTX, VOIDmode, EXPAND_NORMAL);
+  rtx_op2 = expand_normal (TREE_OPERAND (vec_cond_expr, 2));
   if (!insn_data[icode].operand[2].predicate (rtx_op2, mode)
       && mode != VOIDmode)
     rtx_op2 = force_reg (mode, rtx_op2);
index 20ce1aa4d50c78b2d95acd7a23766a1930bec6d4..77fb0352c7bfe09c5c86d141f919732185799968 100644 (file)
@@ -1362,7 +1362,7 @@ expand_expr_stmt (tree exp)
   rtx value;
   tree type;
 
-  value = expand_expr (exp, const0_rtx, VOIDmode, 0);
+  value = expand_expr (exp, const0_rtx, VOIDmode, EXPAND_NORMAL);
   if (GIMPLE_TUPLE_P (exp))
     type = void_type_node;
   else
@@ -1728,7 +1728,7 @@ expand_return (tree retval)
       tree nt = build_qualified_type (ot, TYPE_QUALS (ot) | TYPE_QUAL_CONST);
 
       val = assign_temp (nt, 0, 0, 1);
-      val = expand_expr (retval_rhs, val, GET_MODE (val), 0);
+      val = expand_expr (retval_rhs, val, GET_MODE (val), EXPAND_NORMAL);
       val = force_not_mem (val);
       /* Return the calculated value.  */
       expand_value_return (val);
@@ -1736,7 +1736,7 @@ expand_return (tree retval)
   else
     {
       /* No hard reg used; calculate value into hard return reg.  */
-      expand_expr (retval, const0_rtx, VOIDmode, 0);
+      expand_expr (retval, const0_rtx, VOIDmode, EXPAND_NORMAL);
       expand_value_return (result_rtl);
     }
 }