]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
alias.c (nonoverlapping_memrefs): Use REGNO_PTR_FRAME_P.
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>
Thu, 15 Nov 2001 23:44:58 +0000 (23:44 +0000)
committerRichard Kenner <kenner@gcc.gnu.org>
Thu, 15 Nov 2001 23:44:58 +0000 (18:44 -0500)
* alias.c (nonoverlapping_memrefs): Use REGNO_PTR_FRAME_P.
* emit-rtl.c (change_address): Fix typo in default alignment.
(adjust_address_1): Use mode of NEW, not MODE, when setting size.
* expr.c (highest_pow2_factor, case WITH_RECORD_EXPR): New case.
* rtl.h (REGNO_PTR_FRAME_P): New macro.

* expr.c (store_field): Pass tree instead of max size; callers changed.
Change handling of alignment.
Only copy to_rtx if is TARGET.
(expand_expr_unaligned): Delete; callers now use expand_expr.
(emit_cmp_insn): No longer take ALIGN parm; all callers changed.
(expand_assignment): Change handling of alignment.
Only copy to_rtx if was original.
(get_inner_reference): No longer return alginment; callers changed.
(expand_expr, case COMPONENT_REF): Change handling of alignment.
(expand_expr, case ADDR_EXPR): Make copy if not sufficiently aligned.
(compare_from_rtx): Delete ALIGN parm; all callers changed.
(do_compare_rtx_and_jump): Likewise.
* expr.h: Reflect above changes.
* tree.h: Likewise.
* dwarf2out.c (loc_descriptor_from_tree): Remove ALIGN parameter
to get_inner_reference.
* except.c: Remove ALIGN parameter in call to emit_cmp_and_jump_insns.
* explow.c: Likewise.
* loop.c: Likewise.
* optabs.c: Likewise.
(prepare_cmp_insn): Now static; remove ALIGN parm.  Callers changed.
(emit_cmp_and_jump_insns): Remove ALIGN parm; all callers changed.
* fold-const.c: Remove PALIGN in calls to get_inner_reference.
* function.c (assign_stack_temp_for_type): No longer static.
* optabs.h (emit_cmp_insn): Remove ALIGN parm.
(prepare_cmp_insn): Delete declaration.
* rtl.h (assign_stack_temp_for_type): Add declaration.
* config/d30v/d30v.c: Reflect above changes.
* config/i860/i860.c, config/ia64/ia64.c: Likewise.
* config/rs6000/rs6000.c, config/sh/sh.c: Likewise.
* ada/trans.c, ada/utils2.c: Remove PALIGN parameter to
get_inner_reference.

From-SVN: r47075

20 files changed:
gcc/ChangeLog
gcc/alias.c
gcc/config/d30v/d30v.c
gcc/config/i860/i860.c
gcc/config/ia64/ia64.c
gcc/config/rs6000/rs6000.c
gcc/config/sh/sh.c
gcc/dwarf2out.c
gcc/emit-rtl.c
gcc/except.c
gcc/explow.c
gcc/expr.c
gcc/expr.h
gcc/fold-const.c
gcc/function.c
gcc/loop.c
gcc/optabs.c
gcc/optabs.h
gcc/rtl.h
gcc/tree.h

index f7a2ca8b041f9c716b1ef11a855a98aba3dba2ff..dfe54f59fb9cbb4823620ff7d712dfc4d8585630 100644 (file)
@@ -1,3 +1,42 @@
+Thu Nov 15 17:57:48 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
+
+       * alias.c (nonoverlapping_memrefs): Use REGNO_PTR_FRAME_P.
+       * emit-rtl.c (change_address): Fix typo in default alignment.
+       (adjust_address_1): Use mode of NEW, not MODE, when setting size.
+       * expr.c (highest_pow2_factor, case WITH_RECORD_EXPR): New case.
+       * rtl.h (REGNO_PTR_FRAME_P): New macro.
+
+       * expr.c (store_field): Pass tree instead of max size; callers changed.
+       Change handling of alignment.
+       Only copy to_rtx if is TARGET.
+       (expand_expr_unaligned): Delete; callers now use expand_expr.
+       (emit_cmp_insn): No longer take ALIGN parm; all callers changed.
+       (expand_assignment): Change handling of alignment.
+       Only copy to_rtx if was original.
+       (get_inner_reference): No longer return alginment; callers changed.
+       (expand_expr, case COMPONENT_REF): Change handling of alignment.
+       (expand_expr, case ADDR_EXPR): Make copy if not sufficiently aligned.
+       (compare_from_rtx): Delete ALIGN parm; all callers changed.
+       (do_compare_rtx_and_jump): Likewise.
+       * expr.h: Reflect above changes.
+       * tree.h: Likewise.
+       * dwarf2out.c (loc_descriptor_from_tree): Remove ALIGN parameter
+       to get_inner_reference.
+       * except.c: Remove ALIGN parameter in call to emit_cmp_and_jump_insns.
+       * explow.c: Likewise.
+       * loop.c: Likewise.
+       * optabs.c: Likewise.
+       (prepare_cmp_insn): Now static; remove ALIGN parm.  Callers changed.
+       (emit_cmp_and_jump_insns): Remove ALIGN parm; all callers changed.
+       * fold-const.c: Remove PALIGN in calls to get_inner_reference.
+       * function.c (assign_stack_temp_for_type): No longer static.
+       * optabs.h (emit_cmp_insn): Remove ALIGN parm.
+       (prepare_cmp_insn): Delete declaration.
+       * rtl.h (assign_stack_temp_for_type): Add declaration.
+       * config/d30v/d30v.c: Reflect above changes.
+       * config/i860/i860.c, config/ia64/ia64.c: Likewise.
+       * config/rs6000/rs6000.c, config/sh/sh.c: Likewise.
+
 2001-11-15  Stan Shebs  <shebs@apple.com>
 
        * config/rs6000/rs6000.h: Fix a comment typo.
index 7f01c0c73961907c3621c374ac6c8dae0af95243..27e7e3903fd20a0b46cfddd0fd141ecb85fffebd 100644 (file)
@@ -1806,9 +1806,9 @@ nonoverlapping_memrefs_p (x, y)
   if (! rtx_equal_p (basex, basey))
       return ((CONSTANT_P (basex) && CONSTANT_P (basey))
              || (CONSTANT_P (basex) && REG_P (basey)
-                 && REGNO (basey) <= LAST_VIRTUAL_REGISTER)
+                 && REGNO_PTR_FRAME_P (REGNO (basey)))
              || (CONSTANT_P (basey) && REG_P (basex)
-                 && REGNO (basex) <= LAST_VIRTUAL_REGISTER));
+                 && REGNO_PTR_FRAME_P (REGNO (basex))));
 
   sizex = (GET_CODE (rtlx) != MEM ? GET_MODE_SIZE (GET_MODE (rtlx))
           : MEM_SIZE (rtlx) ? INTVAL (MEM_SIZE (rtlx))
index 83b7e0ca988dada474a7460a066d34352491b6b5..a4d14be8c0c48f35cb6d74324d451096909e7ced 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of target machine for Mitsubishi D30V.
-   Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
    Contributed by Cygnus Solutions.
 
    This file is part of GNU CC.
@@ -2290,7 +2290,7 @@ d30v_expand_builtin_va_arg(valist, type)
                 build_int_2 (1, 0));
 
       emit_cmp_and_jump_insns (expand_expr (t, NULL_RTX, QImode, EXPAND_NORMAL),
-                              GEN_INT (0), EQ, const1_rtx, QImode, 1, 1,
+                              GEN_INT (0), EQ, const1_rtx, QImode, 1,
                               lab_false);
 
       t = build (POSTINCREMENT_EXPR, TREE_TYPE (arg_num), arg_num,
index 5b70d5a7733e084fbd4807869ba3580ff92bb32e..29ee2884fc5cd3a0a5463054f446d08137126d36 100644 (file)
@@ -2312,7 +2312,7 @@ i860_va_arg (valist, type)
       emit_cmp_and_jump_insns (expand_expr (field, NULL_RTX, 0, 0),
                               GEN_INT (nparm - incr), GT, const0_rtx,
                               TYPE_MODE (TREE_TYPE (field)),
-                              TREE_UNSIGNED (field), 0, lab_false);
+                              TREE_UNSIGNED (field), lab_false);
 
       t = fold (build (POSTINCREMENT_EXPR, TREE_TYPE (field), field,
                       build_int_2 (incr, 0)));
index a63376c4e797d2cf1705f891ebdb5786acd987e7..11bac1385ca2b32a765cdd69755a88ef009cab05 100644 (file)
@@ -7398,7 +7398,7 @@ ia64_expand_fetch_and_op (binoptab, mode, arglist, target)
     insn = gen_cmpxchg_acq_di (tmp, mem, tmp, ccv);
   emit_insn (insn);
 
-  emit_cmp_and_jump_insns (tmp, ret, NE, 0, mode, 1, 0, label);
+  emit_cmp_and_jump_insns (tmp, ret, NE, 0, mode, 1, label);
 
   return ret;
 }
@@ -7463,7 +7463,7 @@ ia64_expand_op_and_fetch (binoptab, mode, arglist, target)
     insn = gen_cmpxchg_acq_di (tmp, mem, ret, ccv);
   emit_insn (insn);
 
-  emit_cmp_and_jump_insns (tmp, old, NE, 0, mode, 1, 0, label);
+  emit_cmp_and_jump_insns (tmp, old, NE, 0, mode, 1, label);
 
   return ret;
 }
index 05fcc378b5c72eda2f584ffdc154bd0b4d75ccea..c51ed4e5640f1806f53b5e0371ea5846b6767646 100644 (file)
@@ -2866,8 +2866,8 @@ rs6000_va_arg (valist, type)
   addr_rtx = gen_reg_rtx (Pmode);
 
   emit_cmp_and_jump_insns (expand_expr (reg, NULL_RTX, QImode, EXPAND_NORMAL),
-                          GEN_INT (8 - n_reg + 1),
-                          GE, const1_rtx, QImode, 1, 1, lab_false);
+                          GEN_INT (8 - n_reg + 1), GE, const1_rtx, QImode, 1,
+                          lab_false);
 
   /* Long long is aligned in the registers.  */
   if (n_reg > 1)
index 5d4def82fb83177ff7901b889f5873c060dc2efa..169684529fe67612daea608c25db20fc53a21940 100644 (file)
@@ -4507,7 +4507,7 @@ sh_va_arg (valist, type)
                                                EXPAND_NORMAL),
                                   expand_expr (next_fp_limit, NULL_RTX,
                                                Pmode, EXPAND_NORMAL),
-                                  GE, const1_rtx, Pmode, 1, 1, lab_false);
+                                  GE, const1_rtx, Pmode, 1, lab_false);
 
          if (TYPE_ALIGN (type) > BITS_PER_WORD)
            {
@@ -4542,7 +4542,7 @@ sh_va_arg (valist, type)
                                                EXPAND_NORMAL),
                                   expand_expr (next_o_limit, NULL_RTX,
                                                Pmode, EXPAND_NORMAL),
-                                  GT, const1_rtx, Pmode, 1, 1, lab_false);
+                                  GT, const1_rtx, Pmode, 1, lab_false);
 
          tmp = build1 (ADDR_EXPR, pptr_type_node, next_o);
          r = expand_expr (tmp, addr_rtx, Pmode, EXPAND_NORMAL);
index 886b15bf806bae2f0cb590339061e0e635fcdba2..86a3a6a396131a423603638e388afe7cb928df42 100644 (file)
@@ -7941,10 +7941,9 @@ loc_descriptor_from_tree (loc, addressp)
        HOST_WIDE_INT bitsize, bitpos, bytepos;
        enum machine_mode mode;
        int volatilep;
-       unsigned int alignment;
 
        obj = get_inner_reference (loc, &bitsize, &bitpos, &offset, &mode,
-                                  &unsignedp, &volatilep, &alignment);
+                                  &unsignedp, &volatilep);
 
        if (obj == loc)
          return 0;
index 3729233ff99742bebe129fe9e23634ff4ed8e9ee..9ad98f02cb4aef714c7c7280dc2456ac313cc04d 100644 (file)
@@ -1862,7 +1862,8 @@ change_address (memref, mode, addr)
   MEM_ATTRS (new)
     = get_mem_attrs (MEM_ALIAS_SET (memref), 0, 0,
                     mmode == BLKmode ? 0 : GEN_INT (GET_MODE_SIZE (mmode)),
-                    mmode == BLKmode ? 1 : GET_MODE_ALIGNMENT (mmode),
+                    (mmode == BLKmode ? BITS_PER_UNIT
+                     : GET_MODE_ALIGNMENT (mmode)),
                     mmode);
 
   return new;
@@ -1915,8 +1916,8 @@ adjust_address_1 (memref, mode, offset, validate, adjust)
     memalign = MIN (memalign, (offset & -offset) * BITS_PER_UNIT);
 
   /* We can compute the size in a number of ways.  */
-  if (mode != BLKmode)
-    size = GEN_INT (GET_MODE_SIZE (mode));
+  if (GET_MODE (new) != BLKmode)
+    size = GEN_INT (GET_MODE_SIZE (GET_MODE (new)));
   else if (MEM_SIZE (memref))
     size = plus_constant (MEM_SIZE (memref), -offset);
 
index 1bbc9998a33e02f916ab511ebeb9a4317c016e8b..62f626b4ef65053cf167d04c982c1c1366a5cc98 100644 (file)
@@ -1752,8 +1752,8 @@ build_post_landing_pads ()
                else
                  emit_cmp_and_jump_insns (cfun->eh->filter,
                                           GEN_INT (c->u.catch.filter),
-                                          EQ, NULL_RTX, word_mode,
-                                          0, 0, c->label);
+                                          EQ, NULL_RTX, word_mode, 0,
+                                          c->label);
              }
          }
 
@@ -1779,8 +1779,7 @@ build_post_landing_pads ()
 
          emit_cmp_and_jump_insns (cfun->eh->filter,
                                   GEN_INT (region->u.allowed.filter),
-                                  EQ, NULL_RTX, word_mode, 0, 0,
-                                  region->label);
+                                  EQ, NULL_RTX, word_mode, 0, region->label);
 
          /* We delay the generation of the _Unwind_Resume until we generate
             landing pads.  We emit a marker here so as to get good control
@@ -2152,8 +2151,7 @@ sjlj_emit_function_enter (dispatch_label)
     NOTE_EXPECTED_VALUE (note) = gen_rtx_EQ (VOIDmode, x, const0_rtx);
 
     emit_cmp_and_jump_insns (x, const0_rtx, NE, 0,
-                            TYPE_MODE (integer_type_node), 0, 0,
-                            dispatch_label);
+                            TYPE_MODE (integer_type_node), 0, dispatch_label);
   }
 #else
   expand_builtin_setjmp_setup (plus_constant (XEXP (fc, 0), sjlj_fc_jbuf_ofs),
@@ -2261,9 +2259,8 @@ sjlj_emit_dispatch_table (dispatch_label, lp_info)
          continue;
        }
 
-      emit_cmp_and_jump_insns (dispatch,
-                              GEN_INT (lp_info[i].dispatch_index), EQ,
-                              NULL_RTX, TYPE_MODE (integer_type_node), 0, 0,
+      emit_cmp_and_jump_insns (dispatch, GEN_INT (lp_info[i].dispatch_index),
+                              EQ, NULL_RTX, TYPE_MODE (integer_type_node), 0,
                               cfun->eh->region_array[i]->post_landing_pad);
     }
 
index 358d7caf138993c98413d3d42845f7f3f8e6ceca..dce99a29c8197286fb8c3c50e36e73cee4cce9d4 100644 (file)
@@ -1348,7 +1348,7 @@ allocate_dynamic_stack_space (size, target, known_align)
                                    NULL_RTX, 1, OPTAB_WIDEN);
 #endif
          emit_cmp_and_jump_insns (available, size, GEU, NULL_RTX, Pmode, 1,
-                                  0, space_available);
+                                  space_available);
 #ifdef HAVE_trap
          if (HAVE_trap)
            emit_insn (gen_trap ());
@@ -1564,7 +1564,7 @@ probe_stack_range (first, size)
 
       emit_label (test_lab);
       emit_cmp_and_jump_insns (test_addr, last_addr, CMP_OPCODE,
-                              NULL_RTX, Pmode, 1, 0, loop_lab);
+                              NULL_RTX, Pmode, 1, loop_lab);
       emit_jump (end_lab);
       emit_note (NULL, NOTE_INSN_LOOP_END);
       emit_label (end_lab);
index d48227a0bb282712e2a8ec2bcd38b8bf4a2b781e..a06011ba9ed8bd00a42836351cda8e77704c0992 100644 (file)
@@ -158,13 +158,12 @@ static void store_constructor_field PARAMS ((rtx, unsigned HOST_WIDE_INT,
 static void store_constructor  PARAMS ((tree, rtx, int, HOST_WIDE_INT));
 static rtx store_field         PARAMS ((rtx, HOST_WIDE_INT,
                                         HOST_WIDE_INT, enum machine_mode,
-                                        tree, enum machine_mode, int,
-                                        HOST_WIDE_INT, int));
+                                        tree, enum machine_mode, int, tree,
+                                        int));
 static enum memory_use_mode
   get_memory_usage_from_modifier PARAMS ((enum expand_modifier));
 static rtx var_rtx             PARAMS ((tree));
 static HOST_WIDE_INT highest_pow2_factor PARAMS ((tree));
-static rtx expand_expr_unaligned PARAMS ((tree, unsigned int *));
 static rtx expand_increment    PARAMS ((tree, int, int));
 static void do_jump_by_parts_greater PARAMS ((tree, int, rtx, rtx));
 static void do_jump_by_parts_equality PARAMS ((tree, rtx, rtx));
@@ -877,7 +876,7 @@ convert_move (to, from, unsignedp)
              && STORE_FLAG_VALUE == -1)
            {
              emit_cmp_insn (lowfrom, const0_rtx, NE, NULL_RTX,
-                            lowpart_mode, 0, 0);
+                            lowpart_mode, 0);
              fill_value = gen_reg_rtx (word_mode);
              emit_insn (gen_slt (fill_value));
            }
@@ -3716,15 +3715,15 @@ expand_assignment (to, from, want_value, suggest_reg)
     {
       enum machine_mode mode1;
       HOST_WIDE_INT bitsize, bitpos;
+      rtx orig_to_rtx;
       tree offset;
       int unsignedp;
       int volatilep = 0;
       tree tem;
-      unsigned int alignment;
 
       push_temp_slots ();
       tem = get_inner_reference (to, &bitsize, &bitpos, &offset, &mode1,
-                                &unsignedp, &volatilep, &alignment);
+                                &unsignedp, &volatilep);
 
       /* If we are going to use store_bit_field and extract_bit_field,
         make sure to_rtx will be safe for multiple use.  */
@@ -3732,7 +3731,8 @@ expand_assignment (to, from, want_value, suggest_reg)
       if (mode1 == VOIDmode && want_value)
        tem = stabilize_reference (tem);
 
-      to_rtx = expand_expr (tem, NULL_RTX, VOIDmode, EXPAND_MEMORY_USE_DONT);
+      orig_to_rtx = to_rtx
+       = expand_expr (tem, NULL_RTX, VOIDmode, EXPAND_MEMORY_USE_DONT);
       if (offset != 0)
        {
          rtx offset_rtx = expand_expr (offset, NULL_RTX, VOIDmode, 0);
@@ -3753,10 +3753,10 @@ expand_assignment (to, from, want_value, suggest_reg)
          if (GET_CODE (to_rtx) == MEM
              && GET_MODE (to_rtx) == BLKmode
              && GET_MODE (XEXP (to_rtx, 0)) != VOIDmode
-             && bitsize
+             && bitsize > 0
              && (bitpos % bitsize) == 0
              && (bitsize % GET_MODE_ALIGNMENT (mode1)) == 0
-             && alignment == GET_MODE_ALIGNMENT (mode1))
+             && MEM_ALIGN (to_rtx) == GET_MODE_ALIGNMENT (mode1))
            {
              rtx temp
                = adjust_address (to_rtx, mode1, bitpos / BITS_PER_UNIT);
@@ -3774,35 +3774,31 @@ expand_assignment (to, from, want_value, suggest_reg)
                                   highest_pow2_factor (offset));
        }
 
-      if (volatilep)
-       {
-         if (GET_CODE (to_rtx) == MEM)
-           {
-             /* When the offset is zero, to_rtx is the address of the
-                structure we are storing into, and hence may be shared.
-                We must make a new MEM before setting the volatile bit.  */
-             if (offset == 0)
-               to_rtx = copy_rtx (to_rtx);
 
-             MEM_VOLATILE_P (to_rtx) = 1;
-           }
-#if 0  /* This was turned off because, when a field is volatile
-         in an object which is not volatile, the object may be in a register,
-         and then we would abort over here.  */
-         else
-           abort ();
-#endif
+      /* Deal with volatile and readonly fields.  The former is only done
+        for MEM.  Also set MEM_KEEP_ALIAS_SET_P if needed.  */
+      if (volatilep && GET_CODE (to_rtx) == MEM)
+       {
+         if (to_rtx == orig_to_rtx)
+           to_rtx = copy_rtx (to_rtx);
+         MEM_VOLATILE_P (to_rtx) = 1;
        }
 
       if (TREE_CODE (to) == COMPONENT_REF
          && TREE_READONLY (TREE_OPERAND (to, 1)))
        {
-         if (offset == 0)
+         if (to_rtx == orig_to_rtx)
            to_rtx = copy_rtx (to_rtx);
-
          RTX_UNCHANGING_P (to_rtx) = 1;
        }
 
+      if (! can_address_p (to))
+       {
+         if (to_rtx == orig_to_rtx)
+           to_rtx = copy_rtx (to_rtx);
+         MEM_KEEP_ALIAS_SET_P (to_rtx) = 1;
+       }
+
       /* Check the access.  */
       if (current_function_check_memory_usage && GET_CODE (to_rtx) == MEM)
        {
@@ -3818,7 +3814,7 @@ expand_assignment (to, from, want_value, suggest_reg)
            best_mode = QImode;
 
          best_mode_size = GET_MODE_BITSIZE (best_mode);
-         to_addr = plus_constant (XEXP (to_rtx, 0), (bitpos / BITS_PER_UNIT));
+         to_addr = plus_constant (XEXP (to_rtx, 0), bitpos / BITS_PER_UNIT);
          size = CEIL ((bitpos % best_mode_size) + bitsize, best_mode_size);
          size *= GET_MODE_SIZE (best_mode);
 
@@ -3833,50 +3829,25 @@ expand_assignment (to, from, want_value, suggest_reg)
          in_check_memory_usage = 0;
        }
 
-      /* If this is a varying-length object, we must get the address of
-        the source and do an explicit block move.  */
-      if (bitsize < 0)
-       {
-         unsigned int from_align;
-         rtx from_rtx = expand_expr_unaligned (from, &from_align);
-         rtx inner_to_rtx
-           = adjust_address (to_rtx, BLKmode, bitpos / BITS_PER_UNIT);
-
-         emit_block_move (inner_to_rtx, from_rtx, expr_size (from));
-
-         free_temp_slots ();
-         pop_temp_slots ();
-         return to_rtx;
-       }
-      else
-       {
-         if (! can_address_p (to))
-           {
-             to_rtx = copy_rtx (to_rtx);
-             MEM_KEEP_ALIAS_SET_P (to_rtx) = 1;
-           }
-
-         result = store_field (to_rtx, bitsize, bitpos, mode1, from,
-                               (want_value
-                                /* Spurious cast for HPUX compiler.  */
-                                ? ((enum machine_mode)
-                                   TYPE_MODE (TREE_TYPE (to)))
-                                : VOIDmode),
-                               unsignedp, int_size_in_bytes (TREE_TYPE (tem)),
-                               get_alias_set (to));
+      result = store_field (to_rtx, bitsize, bitpos, mode1, from,
+                           (want_value
+                            /* Spurious cast for HPUX compiler.  */
+                            ? ((enum machine_mode)
+                               TYPE_MODE (TREE_TYPE (to)))
+                            : VOIDmode),
+                           unsignedp, TREE_TYPE (tem), get_alias_set (to));
 
-         preserve_temp_slots (result);
-         free_temp_slots ();
-         pop_temp_slots ();
+      preserve_temp_slots (result);
+      free_temp_slots ();
+      pop_temp_slots ();
 
-         /* If the value is meaningful, convert RESULT to the proper mode.
-            Otherwise, return nothing.  */
-         return (want_value ? convert_modes (TYPE_MODE (TREE_TYPE (to)),
-                                             TYPE_MODE (TREE_TYPE (from)),
-                                             result,
-                                             TREE_UNSIGNED (TREE_TYPE (to)))
-                 : NULL_RTX);
-       }
+      /* If the value is meaningful, convert RESULT to the proper mode.
+        Otherwise, return nothing.  */
+      return (want_value ? convert_modes (TYPE_MODE (TREE_TYPE (to)),
+                                         TYPE_MODE (TREE_TYPE (from)),
+                                         result,
+                                         TREE_UNSIGNED (TREE_TYPE (to)))
+             : NULL_RTX);
     }
 
   /* If the rhs is a function call and its value is not an aggregate,
@@ -4319,7 +4290,7 @@ store_expr (exp, target, want_value)
 
                  label = gen_label_rtx ();
                  emit_cmp_and_jump_insns (size, const0_rtx, LT, NULL_RTX,
-                                          GET_MODE (size), 0, 0, label);
+                                          GET_MODE (size), 0, label);
                }
 
              if (size != const0_rtx)
@@ -4495,8 +4466,8 @@ store_constructor_field (target, bitsize, bitpos, mode, exp, type, cleared,
       store_constructor (exp, target, cleared, bitsize / BITS_PER_UNIT);
     }
   else
-    store_field (target, bitsize, bitpos, mode, exp, VOIDmode, 0,
-                int_size_in_bytes (type), alias_set);
+    store_field (target, bitsize, bitpos, mode, exp, VOIDmode, 0, type,
+                alias_set);
 }
 
 /* Store the value of constructor EXP into the rtx TARGET.
@@ -5126,15 +5097,15 @@ store_constructor (exp, target, cleared, size)
    has mode VALUE_MODE if that is convenient to do.
    In this case, UNSIGNEDP must be nonzero if the value is an unsigned type.
 
-   TOTAL_SIZE is the size in bytes of the structure, or -1 if varying.
+   TYPE is the type of the underlying object,
 
    ALIAS_SET is the alias set for the destination.  This value will
    (in general) be different from that for TARGET, since TARGET is a
    reference to the containing structure.  */
 
 static rtx
-store_field (target, bitsize, bitpos, mode, exp, value_mode, unsignedp,
-            total_size, alias_set)
+store_field (target, bitsize, bitpos, mode, exp, value_mode, unsignedp, type,
+            alias_set)
      rtx target;
      HOST_WIDE_INT bitsize;
      HOST_WIDE_INT bitpos;
@@ -5142,7 +5113,7 @@ store_field (target, bitsize, bitpos, mode, exp, value_mode, unsignedp,
      tree exp;
      enum machine_mode value_mode;
      int unsignedp;
-     HOST_WIDE_INT total_size;
+     tree type;
      int alias_set;
 {
   HOST_WIDE_INT width_mask = 0;
@@ -5154,8 +5125,7 @@ store_field (target, bitsize, bitpos, mode, exp, value_mode, unsignedp,
      side-effects.  */
   if (bitsize == 0)
     return expand_expr (exp, const0_rtx, VOIDmode, 0);
-
-  if (bitsize < HOST_BITS_PER_WIDE_INT)
+  else if (bitsize >=0 && bitsize < HOST_BITS_PER_WIDE_INT)
     width_mask = ((HOST_WIDE_INT) 1 << bitsize) - 1;
 
   /* If we are storing into an unaligned field of an aligned union that is
@@ -5174,24 +5144,22 @@ store_field (target, bitsize, bitpos, mode, exp, value_mode, unsignedp,
     {
       rtx object
        = assign_temp
-         (build_qualified_type (type_for_mode (GET_MODE (target), 0),
-                                TYPE_QUAL_CONST),
+         (build_qualified_type (type, TYPE_QUALS (type) | TYPE_QUAL_CONST),
           0, 1, 1);
       rtx blk_object = copy_rtx (object);
 
       PUT_MODE (blk_object, BLKmode);
-      set_mem_alias_set (blk_object, 0);
+      MEM_COPY_ATTRIBUTES (blk_object, object);
 
       if (bitsize != (HOST_WIDE_INT) GET_MODE_BITSIZE (GET_MODE (target)))
        emit_move_insn (object, target);
 
-      store_field (blk_object, bitsize, bitpos, mode, exp, VOIDmode, 0,
-                  total_size, alias_set);
+      store_field (blk_object, bitsize, bitpos, mode, exp, VOIDmode, 0, type,
+                  alias_set);
 
-      /* Even though we aren't returning target, we need to
-        give it the updated value.  */
       emit_move_insn (target, object);
 
+      /* We want to return the BLKmode version of the data.  */
       return blk_object;
     }
 
@@ -5219,9 +5187,6 @@ store_field (target, bitsize, bitpos, mode, exp, value_mode, unsignedp,
       || (mode != BLKmode && SLOW_UNALIGNED_ACCESS (mode, MEM_ALIGN (target))
          && (MEM_ALIGN (target) < GET_MODE_ALIGNMENT (mode)
              || bitpos % GET_MODE_ALIGNMENT (mode)))
-      || (mode == BLKmode && SLOW_UNALIGNED_ACCESS (mode, MEM_ALIGN (target))
-         && (TYPE_ALIGN (TREE_TYPE (exp)) > MEM_ALIGN (target)
-             || bitpos % TYPE_ALIGN (TREE_TYPE (exp)) != 0))
       /* If the RHS and field are a constant size and the size of the
         RHS isn't the same size as the bitfield, we must use bitfield
         operations.  */
@@ -5260,15 +5225,16 @@ store_field (target, bitsize, bitpos, mode, exp, value_mode, unsignedp,
 
          target = adjust_address (target, VOIDmode, bitpos / BITS_PER_UNIT);
          emit_block_move (target, temp,
-                          bitsize == -1 ? expr_size (exp)
-                          : GEN_INT ((bitsize + BITS_PER_UNIT - 1)
-                                     / BITS_PER_UNIT));
+                          GEN_INT ((bitsize + BITS_PER_UNIT - 1)
+                                   / BITS_PER_UNIT));
 
          return value_mode == VOIDmode ? const0_rtx : target;
        }
 
       /* Store the value in the bitfield.  */
-      store_bit_field (target, bitsize, bitpos, mode, temp, total_size);
+      store_bit_field (target, bitsize, bitpos, mode, temp,
+                      int_size_in_bytes (type));
+
       if (value_mode != VOIDmode)
        {
          /* The caller wants an rtx for the value.
@@ -5298,14 +5264,14 @@ store_field (target, bitsize, bitpos, mode, exp, value_mode, unsignedp,
 
          return extract_bit_field (target, bitsize, bitpos, unsignedp,
                                    NULL_RTX, value_mode, VOIDmode,
-                                   total_size);
+                                   int_size_in_bytes (type));
        }
       return const0_rtx;
     }
   else
     {
       rtx addr = XEXP (target, 0);
-      rtx to_rtx;
+      rtx to_rtx = target;
 
       /* If a value is wanted, it must be the lhs;
         so make the address stable for multiple use.  */
@@ -5317,19 +5283,18 @@ store_field (target, bitsize, bitpos, mode, exp, value_mode, unsignedp,
                && GET_CODE (XEXP (addr, 1)) == CONST_INT
                && (XEXP (addr, 0) == virtual_incoming_args_rtx
                    || XEXP (addr, 0) == virtual_stack_vars_rtx)))
-       target = replace_equiv_address (target, copy_to_reg (addr));
+       to_rtx = replace_equiv_address (to_rtx, copy_to_reg (addr));
 
       /* Now build a reference to just the desired component.  */
 
-      to_rtx = copy_rtx (adjust_address (target, mode,
-                                        bitpos / BITS_PER_UNIT));
+      to_rtx = adjust_address (target, mode, bitpos / BITS_PER_UNIT);
+
+      if (to_rtx == target)
+       to_rtx = copy_rtx (to_rtx);
 
       MEM_SET_IN_STRUCT_P (to_rtx, 1);
       if (!MEM_KEEP_ALIAS_SET_P (to_rtx) && MEM_ALIAS_SET (to_rtx) != 0)
-       {
-         to_rtx = copy_rtx (to_rtx);
-         set_mem_alias_set (to_rtx, alias_set);
-       }
+       set_mem_alias_set (to_rtx, alias_set);
 
       return store_expr (exp, to_rtx, value_mode != VOIDmode);
     }
@@ -5345,9 +5310,6 @@ store_field (target, bitsize, bitpos, mode, exp, value_mode, unsignedp,
    giving the variable offset (in units) in *POFFSET.
    This offset is in addition to the bit position.
    If the position is not variable, we store 0 in *POFFSET.
-   We set *PALIGNMENT to the alignment of the address that will be
-   computed.  This is the alignment of the thing we return if *POFFSET
-   is zero, but can be more less strictly aligned if *POFFSET is nonzero.
 
    If any of the extraction expressions is volatile,
    we store 1 in *PVOLATILEP.  Otherwise we don't change that.
@@ -5362,7 +5324,7 @@ store_field (target, bitsize, bitpos, mode, exp, value_mode, unsignedp,
 
 tree
 get_inner_reference (exp, pbitsize, pbitpos, poffset, pmode,
-                    punsignedp, pvolatilep, palignment)
+                    punsignedp, pvolatilep)
      tree exp;
      HOST_WIDE_INT *pbitsize;
      HOST_WIDE_INT *pbitpos;
@@ -5370,13 +5332,11 @@ get_inner_reference (exp, pbitsize, pbitpos, poffset, pmode,
      enum machine_mode *pmode;
      int *punsignedp;
      int *pvolatilep;
-     unsigned int *palignment;
 {
   tree size_tree = 0;
   enum machine_mode mode = VOIDmode;
   tree offset = size_zero_node;
   tree bit_offset = bitsize_zero_node;
-  unsigned int alignment = BIGGEST_ALIGNMENT;
   tree placeholder_ptr = 0;
   tree tem;
 
@@ -5438,8 +5398,7 @@ get_inner_reference (exp, pbitsize, pbitpos, poffset, pmode,
          bit_offset = size_binop (PLUS_EXPR, bit_offset,
                                   DECL_FIELD_BIT_OFFSET (field));
 
-         if (! host_integerp (offset, 0))
-           alignment = MIN (alignment, DECL_OFFSET_ALIGN (field));
+         /* ??? Right now we don't do anything with DECL_OFFSET_ALIGN.  */
        }
 
       else if (TREE_CODE (exp) == ARRAY_REF
@@ -5500,19 +5459,9 @@ get_inner_reference (exp, pbitsize, pbitpos, poffset, pmode,
       if (TREE_THIS_VOLATILE (exp))
        *pvolatilep = 1;
 
-      /* If the offset is non-constant already, then we can't assume any
-        alignment more than the alignment here.  */
-      if (! TREE_CONSTANT (offset))
-       alignment = MIN (alignment, TYPE_ALIGN (TREE_TYPE (exp)));
-
       exp = TREE_OPERAND (exp, 0);
     }
 
-  if (DECL_P (exp))
-    alignment = MIN (alignment, DECL_ALIGN (exp));
-  else if (TREE_TYPE (exp) != 0)
-    alignment = MIN (alignment, TYPE_ALIGN (TREE_TYPE (exp)));
-
   /* If OFFSET is constant, see if we can return the whole thing as a
      constant bit position.  Otherwise, split it up.  */
   if (host_integerp (offset, 0)
@@ -5525,7 +5474,6 @@ get_inner_reference (exp, pbitsize, pbitpos, poffset, pmode,
     *pbitpos = tree_low_cst (bit_offset, 0), *poffset = offset;
 
   *pmode = mode;
-  *palignment = alignment;
   return exp;
 }
 
@@ -6022,7 +5970,7 @@ highest_pow2_factor (exp)
       return MAX (1, c0 / c1);
 
     case NON_LVALUE_EXPR:  case NOP_EXPR:  case CONVERT_EXPR:
-    case COMPOUND_EXPR:  case SAVE_EXPR:
+    case COMPOUND_EXPR:    case SAVE_EXPR: case WITH_RECORD_EXPR:
       return highest_pow2_factor (TREE_OPERAND (exp, 0));
 
     case COND_EXPR:
@@ -7011,10 +6959,8 @@ expand_expr (exp, target, tmode, modifier)
        HOST_WIDE_INT bitsize, bitpos;
        tree offset;
        int volatilep = 0;
-       unsigned int alignment;
        tree tem = get_inner_reference (exp, &bitsize, &bitpos, &offset,
-                                       &mode1, &unsignedp, &volatilep,
-                                       &alignment);
+                                       &mode1, &unsignedp, &volatilep);
        rtx orig_op0;
 
        /* If we got back the original object, something is wrong.  Perhaps
@@ -7100,7 +7046,7 @@ expand_expr (exp, target, tmode, modifier)
                && bitsize != 0
                && (bitpos % bitsize) == 0
                && (bitsize % GET_MODE_ALIGNMENT (mode1)) == 0
-               && alignment == GET_MODE_ALIGNMENT (mode1))
+               && MEM_ALIGN (op0) == GET_MODE_ALIGNMENT (mode1))
              {
                rtx temp = adjust_address (op0, mode1, bitpos / BITS_PER_UNIT);
 
@@ -7171,7 +7117,7 @@ expand_expr (exp, target, tmode, modifier)
            /* If the field isn't aligned enough to fetch as a memref,
               fetch it as a bit field.  */
            || (mode1 != BLKmode
-               && SLOW_UNALIGNED_ACCESS (mode1, alignment)
+               && SLOW_UNALIGNED_ACCESS (mode1, MEM_ALIGN (op))
                && ((TYPE_ALIGN (TREE_TYPE (tem))
                     < GET_MODE_ALIGNMENT (mode))
                    || (bitpos % GET_MODE_ALIGNMENT (mode) != 0)))
@@ -7182,11 +7128,7 @@ expand_expr (exp, target, tmode, modifier)
                && (TREE_CODE (TYPE_SIZE (TREE_TYPE (exp)))
                    == INTEGER_CST)
                && 0 != compare_tree_int (TYPE_SIZE (TREE_TYPE (exp)),
-                                         bitsize))
-           || (mode == BLKmode
-               && SLOW_UNALIGNED_ACCESS (mode, alignment)
-               && (TYPE_ALIGN (type) > alignment
-                   || bitpos % TYPE_ALIGN (type) != 0)))
+                                         bitsize)))
          {
            enum machine_mode ext_mode = mode;
 
@@ -7210,9 +7152,8 @@ expand_expr (exp, target, tmode, modifier)
                  target = assign_temp (type, 0, 1, 1);
 
                emit_block_move (target, op0,
-                                bitsize == -1 ? expr_size  (exp)
-                                : GEN_INT ((bitsize + BITS_PER_UNIT - 1)
-                                           / BITS_PER_UNIT));
+                                GEN_INT ((bitsize + BITS_PER_UNIT - 1)
+                                         / BITS_PER_UNIT));
 
                return target;
              }
@@ -7268,7 +7209,7 @@ expand_expr (exp, target, tmode, modifier)
 
        set_mem_attributes (op0, exp, 0);
        if (GET_CODE (XEXP (op0, 0)) == REG)
-         mark_reg_pointer (XEXP (op0, 0), alignment);
+         mark_reg_pointer (XEXP (op0, 0), MEM_ALIGN (op0));
 
        MEM_VOLATILE_P (op0) |= volatilep;
        if (mode == mode1 || mode1 == BLKmode || mode1 == tmode
@@ -7375,17 +7316,13 @@ expand_expr (exp, target, tmode, modifier)
 
        if (! (GET_CODE (index_val) == CONST_INT
               && GET_CODE (lo_r) == CONST_INT))
-         {
-           emit_cmp_and_jump_insns (index_val, lo_r, LT, NULL_RTX,
-                                    GET_MODE (index_val), iunsignedp, 0, op1);
-         }
+         emit_cmp_and_jump_insns (index_val, lo_r, LT, NULL_RTX,
+                                  GET_MODE (index_val), iunsignedp, op1);
 
        if (! (GET_CODE (index_val) == CONST_INT
               && GET_CODE (hi_r) == CONST_INT))
-         {
-           emit_cmp_and_jump_insns (index_val, hi_r, GT, NULL_RTX,
-                                    GET_MODE (index_val), iunsignedp, 0, op1);
-         }
+         emit_cmp_and_jump_insns (index_val, hi_r, GT, NULL_RTX,
+                                  GET_MODE (index_val), iunsignedp, op1);
 
        /* Calculate the element number of bit zero in the first word
           of the set.  */
@@ -7511,7 +7448,7 @@ expand_expr (exp, target, tmode, modifier)
                               * BITS_PER_UNIT),
                              (HOST_WIDE_INT) GET_MODE_BITSIZE (mode)),
                         0, TYPE_MODE (valtype), TREE_OPERAND (exp, 0),
-                        VOIDmode, 0, int_size_in_bytes (type), 0);
+                        VOIDmode, 0, type, 0);
          else
            abort ();
 
@@ -8021,7 +7958,7 @@ expand_expr (exp, target, tmode, modifier)
        {
          int unsignedp = TREE_UNSIGNED (TREE_TYPE (TREE_OPERAND (exp, 1)));
          do_compare_rtx_and_jump (target, op1, code == MAX_EXPR ? GE : LE,
-                                  unsignedp, mode, NULL_RTX, 0, NULL_RTX,
+                                  unsignedp, mode, NULL_RTX, NULL_RTX,
                                   op0);
        }
       emit_move_insn (target, op1);
@@ -8114,7 +8051,7 @@ expand_expr (exp, target, tmode, modifier)
 
          op1 = gen_label_rtx ();
          emit_cmp_and_jump_insns (temp, const0_rtx, EQ, NULL_RTX,
-                                  GET_MODE (temp), unsignedp, 0, op1);
+                                  GET_MODE (temp), unsignedp, op1);
          emit_move_insn (temp, const1_rtx);
          emit_label (op1);
          return temp;
@@ -8680,8 +8617,7 @@ expand_expr (exp, target, tmode, modifier)
                   || GET_CODE (op0) == CONCAT || GET_CODE (op0) == ADDRESSOF
                   || GET_CODE (op0) == PARALLEL)
            {
-             /* If this object is in a register, it must be not
-                be BLKmode.  */
+             /* If this object is in a register, it must can't be BLKmode.  */
              tree inner_type = TREE_TYPE (TREE_OPERAND (exp, 0));
              tree nt = build_qualified_type (inner_type,
                                              (TYPE_QUALS (inner_type)
@@ -8713,6 +8649,25 @@ expand_expr (exp, target, tmode, modifier)
              return op0;
            }
 
+         /* If OP0 is not aligned as least as much as the type requires,
+            we need to make a temporary, copy OP0 to it, and take the
+            address of the temporary.  */
+         if (expr_align (TREE_OPERAND (exp, 0)) > MEM_ALIGN (op0))
+           {
+             tree inner_type = TREE_TYPE (TREE_OPERAND (exp, 0));
+             rtx new
+               = assign_stack_temp_for_type
+                 (TYPE_MODE (inner_type),
+                  MEM_SIZE (op0) ? INTVAL (MEM_SIZE (op0))
+                  : int_size_in_bytes (TREE_TYPE (inner_type)),
+                  1, build_qualified_type (inner_type,
+                                           (TYPE_QUALS (inner_type)
+                                            | TYPE_QUAL_CONST)));
+
+             emit_block_move (new, op0, expr_size (TREE_OPERAND (exp, 0)));
+             op0 = new;
+           }
+
          op0 = force_operand (XEXP (op0, 0), target);
        }
 
@@ -8902,313 +8857,6 @@ expand_expr (exp, target, tmode, modifier)
   return temp;
 }
 \f
-/* Similar to expand_expr, except that we don't specify a target, target
-   mode, or modifier and we return the alignment of the inner type.  This is
-   used in cases where it is not necessary to align the result to the
-   alignment of its type as long as we know the alignment of the result, for
-   example for comparisons of BLKmode values.  */
-
-static rtx
-expand_expr_unaligned (exp, palign)
-     tree exp;
-     unsigned int *palign;
-{
-  rtx op0;
-  tree type = TREE_TYPE (exp);
-  enum machine_mode mode = TYPE_MODE (type);
-
-  /* Default the alignment we return to that of the type.  */
-  *palign = TYPE_ALIGN (type);
-
-  /* The only cases in which we do anything special is if the resulting mode
-     is BLKmode.  */
-  if (mode != BLKmode)
-    return expand_expr (exp, NULL_RTX, VOIDmode, EXPAND_NORMAL);
-
-  switch (TREE_CODE (exp))
-    {
-    case CONVERT_EXPR:
-    case NOP_EXPR:
-    case NON_LVALUE_EXPR:
-      /* Conversions between BLKmode values don't change the underlying
-         alignment or value.  */
-      if (TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0))) == BLKmode)
-       return expand_expr_unaligned (TREE_OPERAND (exp, 0), palign);
-      break;
-
-    case ARRAY_REF:
-      /* Much of the code for this case is copied directly from expand_expr.
-        We need to duplicate it here because we will do something different
-        in the fall-through case, so we need to handle the same exceptions
-        it does.  */
-      {
-       tree array = TREE_OPERAND (exp, 0);
-       tree domain = TYPE_DOMAIN (TREE_TYPE (array));
-       tree low_bound = domain ? TYPE_MIN_VALUE (domain) : integer_zero_node;
-       tree index = convert (sizetype, TREE_OPERAND (exp, 1));
-       HOST_WIDE_INT i;
-
-       if (TREE_CODE (TREE_TYPE (TREE_OPERAND (exp, 0))) != ARRAY_TYPE)
-         abort ();
-
-       /* Optimize the special-case of a zero lower bound.
-
-          We convert the low_bound to sizetype to avoid some problems
-          with constant folding.  (E.g. suppose the lower bound is 1,
-          and its mode is QI.  Without the conversion,  (ARRAY
-          +(INDEX-(unsigned char)1)) becomes ((ARRAY+(-(unsigned char)1))
-          +INDEX), which becomes (ARRAY+255+INDEX).  Oops!)  */
-
-       if (! integer_zerop (low_bound))
-         index = size_diffop (index, convert (sizetype, low_bound));
-
-       /* If this is a constant index into a constant array,
-          just get the value from the array.  Handle both the cases when
-          we have an explicit constructor and when our operand is a variable
-          that was declared const.  */
-
-       if (TREE_CODE (array) == CONSTRUCTOR && ! TREE_SIDE_EFFECTS (array)
-           && host_integerp (index, 0)
-           && 0 > compare_tree_int (index,
-                                    list_length (CONSTRUCTOR_ELTS
-                                                 (TREE_OPERAND (exp, 0)))))
-         {
-           tree elem;
-
-           for (elem = CONSTRUCTOR_ELTS (TREE_OPERAND (exp, 0)),
-                i = tree_low_cst (index, 0);
-                elem != 0 && i != 0; i--, elem = TREE_CHAIN (elem))
-             ;
-
-           if (elem)
-             return expand_expr_unaligned (fold (TREE_VALUE (elem)), palign);
-         }
-
-       else if (optimize >= 1
-                && TREE_READONLY (array) && ! TREE_SIDE_EFFECTS (array)
-                && TREE_CODE (array) == VAR_DECL && DECL_INITIAL (array)
-                && TREE_CODE (DECL_INITIAL (array)) != ERROR_MARK)
-         {
-           if (TREE_CODE (index) == INTEGER_CST)
-             {
-               tree init = DECL_INITIAL (array);
-
-               if (TREE_CODE (init) == CONSTRUCTOR)
-                 {
-                   tree elem;
-
-                   for (elem = CONSTRUCTOR_ELTS (init);
-                        ! tree_int_cst_equal (TREE_PURPOSE (elem), index);
-                        elem = TREE_CHAIN (elem))
-                     ;
-
-                   if (elem)
-                     return expand_expr_unaligned (fold (TREE_VALUE (elem)),
-                                                   palign);
-                 }
-             }
-         }
-      }
-      /* Fall through.  */
-
-    case COMPONENT_REF:
-    case BIT_FIELD_REF:
-    case ARRAY_RANGE_REF:
-      /* If the operand is a CONSTRUCTOR, we can just extract the
-        appropriate field if it is present.  Don't do this if we have
-        already written the data since we want to refer to that copy
-        and varasm.c assumes that's what we'll do.  */
-      if (TREE_CODE (exp) == COMPONENT_REF
-         && TREE_CODE (TREE_OPERAND (exp, 0)) == CONSTRUCTOR
-         && TREE_CST_RTL (TREE_OPERAND (exp, 0)) == 0)
-       {
-         tree elt;
-
-         for (elt = CONSTRUCTOR_ELTS (TREE_OPERAND (exp, 0)); elt;
-              elt = TREE_CHAIN (elt))
-           if (TREE_PURPOSE (elt) == TREE_OPERAND (exp, 1))
-             /* Note that unlike the case in expand_expr, we know this is
-                BLKmode and hence not an integer.  */
-             return expand_expr_unaligned (TREE_VALUE (elt), palign);
-       }
-
-      {
-       enum machine_mode mode1;
-       HOST_WIDE_INT bitsize, bitpos;
-       tree offset;
-       int volatilep = 0;
-       unsigned int alignment;
-       int unsignedp;
-       tree tem = get_inner_reference (exp, &bitsize, &bitpos, &offset,
-                                       &mode1, &unsignedp, &volatilep,
-                                       &alignment);
-
-       /* If we got back the original object, something is wrong.  Perhaps
-          we are evaluating an expression too early.  In any event, don't
-          infinitely recurse.  */
-       if (tem == exp)
-         abort ();
-
-       op0 = expand_expr (tem, NULL_RTX, VOIDmode, EXPAND_NORMAL);
-
-       /* If this is a constant, put it into a register if it is a
-          legitimate constant and OFFSET is 0 and memory if it isn't.  */
-       if (CONSTANT_P (op0))
-         {
-           enum machine_mode inner_mode = TYPE_MODE (TREE_TYPE (tem));
-
-           if (inner_mode != BLKmode && LEGITIMATE_CONSTANT_P (op0)
-               && offset == 0)
-             op0 = force_reg (inner_mode, op0);
-           else
-             op0 = validize_mem (force_const_mem (inner_mode, op0));
-         }
-
-       if (offset != 0)
-         {
-           rtx offset_rtx = expand_expr (offset, NULL_RTX, VOIDmode, 0);
-
-           /* If this object is in a register, put it into memory.
-              This case can't occur in C, but can in Ada if we have
-              unchecked conversion of an expression from a scalar type to
-              an array or record type.  */
-           if (GET_CODE (op0) == REG || GET_CODE (op0) == SUBREG
-               || GET_CODE (op0) == CONCAT || GET_CODE (op0) == ADDRESSOF)
-             {
-               tree nt = build_qualified_type (TREE_TYPE (tem),
-                                               (TYPE_QUALS (TREE_TYPE (tem))
-                                                | TYPE_QUAL_CONST));
-               rtx memloc = assign_temp (nt, 1, 1, 1);
-
-               emit_move_insn (memloc, op0);
-               op0 = memloc;
-             }
-
-           if (GET_CODE (op0) != MEM)
-             abort ();
-
-           if (GET_MODE (offset_rtx) != ptr_mode)
-             offset_rtx = convert_to_mode (ptr_mode, offset_rtx, 0);
-
-#ifdef POINTERS_EXTEND_UNSIGNED
-           if (GET_MODE (offset_rtx) != Pmode)
-             offset_rtx = convert_memory_address (Pmode, offset_rtx);
-#endif
-
-           op0 = offset_address (op0, offset_rtx,
-                                 highest_pow2_factor (offset));
-         }
-
-       /* Don't forget about volatility even if this is a bitfield.  */
-       if (GET_CODE (op0) == MEM && volatilep && ! MEM_VOLATILE_P (op0))
-         {
-           op0 = copy_rtx (op0);
-           MEM_VOLATILE_P (op0) = 1;
-         }
-
-       /* Check the access.  */
-       if (current_function_check_memory_usage && GET_CODE (op0) == MEM)
-         {
-           rtx to;
-           int size;
-
-           to = plus_constant (XEXP (op0, 0), (bitpos / BITS_PER_UNIT));
-           size = (bitpos % BITS_PER_UNIT) + bitsize + BITS_PER_UNIT - 1;
-
-           /* Check the access right of the pointer.  */
-           in_check_memory_usage = 1;
-           if (size > BITS_PER_UNIT)
-             emit_library_call (chkr_check_addr_libfunc,
-                                LCT_CONST_MAKE_BLOCK, VOIDmode, 3,
-                                to, ptr_mode, GEN_INT (size / BITS_PER_UNIT),
-                                TYPE_MODE (sizetype),
-                                GEN_INT (MEMORY_USE_RO),
-                                TYPE_MODE (integer_type_node));
-           in_check_memory_usage = 0;
-         }
-
-       /* In cases where an aligned union has an unaligned object
-          as a field, we might be extracting a BLKmode value from
-          an integer-mode (e.g., SImode) object.  Handle this case
-          by doing the extract into an object as wide as the field
-          (which we know to be the width of a basic mode), then
-          storing into memory, and changing the mode to BLKmode.
-          If we ultimately want the address (EXPAND_CONST_ADDRESS or
-          EXPAND_INITIALIZER), then we must not copy to a temporary.  */
-       if (mode1 == VOIDmode
-           || GET_CODE (op0) == REG || GET_CODE (op0) == SUBREG
-           || (SLOW_UNALIGNED_ACCESS (mode1, alignment)
-               && (TYPE_ALIGN (type) > alignment
-                   || bitpos % TYPE_ALIGN (type) != 0)))
-         {
-           enum machine_mode ext_mode = mode_for_size (bitsize, MODE_INT, 1);
-
-           if (ext_mode == BLKmode)
-             {
-               /* In this case, BITPOS must start at a byte boundary.  */
-               if (GET_CODE (op0) != MEM
-                   || bitpos % BITS_PER_UNIT != 0)
-                 abort ();
-
-               op0 = adjust_address (op0, VOIDmode, bitpos / BITS_PER_UNIT);
-             }
-           else
-             {
-               tree nt = build_qualified_type (type_for_mode (ext_mode, 0),
-                                               TYPE_QUAL_CONST);
-               rtx new = assign_temp (nt, 0, 1, 1);
-
-               op0 = extract_bit_field (validize_mem (op0), bitsize, bitpos,
-                                        unsignedp, NULL_RTX, ext_mode,
-                                        ext_mode,
-                                        int_size_in_bytes (TREE_TYPE (tem)));
-
-               /* If the result is a record type and BITSIZE is narrower than
-                  the mode of OP0, an integral mode, and this is a big endian
-                  machine, we must put the field into the high-order bits.  */
-               if (TREE_CODE (type) == RECORD_TYPE && BYTES_BIG_ENDIAN
-                   && GET_MODE_CLASS (GET_MODE (op0)) == MODE_INT
-                   && bitsize < GET_MODE_BITSIZE (GET_MODE (op0)))
-                 op0 = expand_shift (LSHIFT_EXPR, GET_MODE (op0), op0,
-                                     size_int (GET_MODE_BITSIZE
-                                               (GET_MODE (op0))
-                                               - bitsize),
-                                     op0, 1);
-
-               emit_move_insn (new, op0);
-               op0 = copy_rtx (new);
-               PUT_MODE (op0, BLKmode);
-             }
-         }
-       else
-         /* Get a reference to just this component.  */
-         op0 = adjust_address (op0, mode1, bitpos / BITS_PER_UNIT);
-
-       set_mem_attributes (op0, exp, 0);
-
-       /* Adjust the alignment in case the bit position is not
-          a multiple of the alignment of the inner object.  */
-       while (bitpos % alignment != 0)
-         alignment >>= 1;
-
-       if (GET_CODE (XEXP (op0, 0)) == REG)
-         mark_reg_pointer (XEXP (op0, 0), alignment);
-
-       MEM_IN_STRUCT_P (op0) = 1;
-       MEM_VOLATILE_P (op0) |= volatilep;
-
-       *palign = alignment;
-       return op0;
-      }
-
-    default:
-      break;
-
-    }
-
-  return expand_expr (exp, NULL_RTX, VOIDmode, EXPAND_NORMAL);
-}
-\f
 /* Return the tree node if a ARG corresponds to a string constant or zero
    if it doesn't.  If we return non-zero, set *PTR_OFFSET to the offset
    in bytes within the string that ARG is accessing.  The type of the
@@ -9697,12 +9345,11 @@ do_jump (exp, if_false_label, if_true_label)
        tree type;
        tree offset;
        int volatilep = 0;
-       unsigned int alignment;
 
        /* Get description of this reference.  We don't actually care
           about the underlying object here.  */
        get_inner_reference (exp, &bitsize, &bitpos, &offset, &mode,
-                            &unsignedp, &volatilep, &alignment);
+                            &unsignedp, &volatilep);
 
        type = type_for_size (bitsize, unsignedp);
        if (! SLOW_BYTE_ACCESS
@@ -10004,7 +9651,7 @@ do_jump (exp, if_false_label, if_true_label)
       else if (GET_MODE (temp) != VOIDmode)
        do_compare_rtx_and_jump (temp, CONST0_RTX (GET_MODE (temp)),
                                 NE, TREE_UNSIGNED (TREE_TYPE (exp)),
-                                GET_MODE (temp), NULL_RTX, 0,
+                                GET_MODE (temp), NULL_RTX,
                                 if_false_label, if_true_label);
       else
        abort ();
@@ -10079,12 +9726,12 @@ do_jump_by_parts_greater_rtx (mode, unsignedp, op0, op1, if_false_label, if_true
 
       /* All but high-order word must be compared as unsigned.  */
       do_compare_rtx_and_jump (op0_word, op1_word, GT,
-                              (unsignedp || i > 0), word_mode, NULL_RTX, 0,
+                              (unsignedp || i > 0), word_mode, NULL_RTX,
                               NULL_RTX, if_true_label);
 
       /* Consider lower words only if these are equal.  */
       do_compare_rtx_and_jump (op0_word, op1_word, NE, unsignedp, word_mode,
-                              NULL_RTX, 0, NULL_RTX, if_false_label);
+                              NULL_RTX, NULL_RTX, if_false_label);
     }
 
   if (if_false_label)
@@ -10115,8 +9762,7 @@ do_jump_by_parts_equality (exp, if_false_label, if_true_label)
     do_compare_rtx_and_jump (operand_subword_force (op0, i, mode),
                             operand_subword_force (op1, i, mode),
                             EQ, TREE_UNSIGNED (TREE_TYPE (exp)),
-                            word_mode, NULL_RTX, 0, if_false_label,
-                            NULL_RTX);
+                            word_mode, NULL_RTX, if_false_label, NULL_RTX);
 
   if (if_true_label)
     emit_jump (if_true_label);
@@ -10153,7 +9799,7 @@ do_jump_by_parts_equality_rtx (op0, if_false_label, if_true_label)
   if (part != 0)
     {
       do_compare_rtx_and_jump (part, const0_rtx, EQ, 1, word_mode,
-                              NULL_RTX, 0, if_false_label, if_true_label);
+                              NULL_RTX, if_false_label, if_true_label);
 
       return;
     }
@@ -10164,7 +9810,7 @@ do_jump_by_parts_equality_rtx (op0, if_false_label, if_true_label)
 
   for (i = 0; i < nwords; i++)
     do_compare_rtx_and_jump (operand_subword_force (op0, i, GET_MODE (op0)),
-                            const0_rtx, EQ, 1, word_mode, NULL_RTX, 0,
+                            const0_rtx, EQ, 1, word_mode, NULL_RTX,
                             if_false_label, NULL_RTX);
 
   if (if_true_label)
@@ -10183,19 +9829,15 @@ do_jump_by_parts_equality_rtx (op0, if_false_label, if_true_label)
    things pushed on the stack that aren't yet used.
 
    If MODE is BLKmode, SIZE is an RTX giving the size of the objects being
-   compared.
-
-   If ALIGN is non-zero, it is the alignment of this type; if zero, the
-   size of MODE should be used.  */
+   compared.  */
 
 rtx
-compare_from_rtx (op0, op1, code, unsignedp, mode, size, align)
+compare_from_rtx (op0, op1, code, unsignedp, mode, size)
      rtx op0, op1;
      enum rtx_code code;
      int unsignedp;
      enum machine_mode mode;
      rtx size;
-     unsigned int align;
 {
   rtx tem;
 
@@ -10244,7 +9886,7 @@ compare_from_rtx (op0, op1, code, unsignedp, mode, size, align)
     }
 #endif
 
-  emit_cmp_insn (op0, op1, code, size, mode, unsignedp, align);
+  emit_cmp_insn (op0, op1, code, size, mode, unsignedp);
 
   return gen_rtx_fmt_ee (code, VOIDmode, cc0_rtx, const0_rtx);
 }
@@ -10253,20 +9895,16 @@ compare_from_rtx (op0, op1, code, unsignedp, mode, size, align)
    The decision as to signed or unsigned comparison must be made by the caller.
 
    If MODE is BLKmode, SIZE is an RTX giving the size of the objects being
-   compared.
-
-   If ALIGN is non-zero, it is the alignment of this type; if zero, the
-   size of MODE should be used.  */
+   compared.  */
 
 void
-do_compare_rtx_and_jump (op0, op1, code, unsignedp, mode, size, align,
+do_compare_rtx_and_jump (op0, op1, code, unsignedp, mode, size,
                         if_false_label, if_true_label)
      rtx op0, op1;
      enum rtx_code code;
      int unsignedp;
      enum machine_mode mode;
      rtx size;
-     unsigned int align;
      rtx if_false_label, if_true_label;
 {
   rtx tem;
@@ -10344,7 +9982,7 @@ do_compare_rtx_and_jump (op0, op1, code, unsignedp, mode, size, align,
       if_true_label = gen_label_rtx ();
     }
 
-  emit_cmp_and_jump_insns (op0, op1, code, size, mode, unsignedp, align,
+  emit_cmp_and_jump_insns (op0, op1, code, size, mode, unsignedp,
                           if_true_label);
 
   if (if_false_label)
@@ -10370,7 +10008,6 @@ do_compare_and_jump (exp, signed_code, unsigned_code, if_false_label,
      enum rtx_code signed_code, unsigned_code;
      rtx if_false_label, if_true_label;
 {
-  unsigned int align0, align1;
   rtx op0, op1;
   tree type;
   enum machine_mode mode;
@@ -10378,11 +10015,11 @@ do_compare_and_jump (exp, signed_code, unsigned_code, if_false_label,
   enum rtx_code code;
 
   /* Don't crash if the comparison was erroneous.  */
-  op0 = expand_expr_unaligned (TREE_OPERAND (exp, 0), &align0);
+  op0 = expand_expr (TREE_OPERAND (exp, 0), NULL_RTX, VOIDmode, 0);
   if (TREE_CODE (TREE_OPERAND (exp, 0)) == ERROR_MARK)
     return;
 
-  op1 = expand_expr_unaligned (TREE_OPERAND (exp, 1), &align1);
+  op1 = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, VOIDmode, 0);
   if (TREE_CODE (TREE_OPERAND (exp, 1)) == ERROR_MARK)
     return;
 
@@ -10434,7 +10071,6 @@ do_compare_and_jump (exp, signed_code, unsigned_code, if_false_label,
   do_compare_rtx_and_jump (op0, op1, code, unsignedp, mode,
                           ((mode == BLKmode)
                            ? expr_size (TREE_OPERAND (exp, 0)) : NULL_RTX),
-                          MIN (align0, align1),
                           if_false_label, if_true_label);
 }
 \f
@@ -10713,7 +10349,7 @@ do_store_flag (exp, target, mode, only_cheap)
 
   emit_move_insn (target, invert ? const0_rtx : const1_rtx);
   result = compare_from_rtx (op0, op1, code, unsignedp,
-                            operand_mode, NULL_RTX, 0);
+                            operand_mode, NULL_RTX);
   if (GET_CODE (result) == CONST_INT)
     return (((result == const0_rtx && ! invert)
             || (result != const0_rtx && invert))
@@ -10780,7 +10416,7 @@ try_casesi (index_type, index_expr, minval, range,
       minval = integer_zero_node;
       index = expand_expr (index_expr, NULL_RTX, VOIDmode, 0);
       emit_cmp_and_jump_insns (rangertx, index, LTU, NULL_RTX,
-                              omode, 1, 0, default_label);
+                              omode, 1, default_label);
       /* Now we can safely truncate.  */
       index = convert_to_mode (index_mode, index, 0);
     }
@@ -10860,7 +10496,7 @@ do_tablejump (index, mode, range, table_label, default_label)
      the maximum value of the range.  */
 
   emit_cmp_and_jump_insns (index, range, GTU, NULL_RTX, mode, 1,
-                          0, default_label);
+                          default_label);
 
   /* If index is in range, it must fit in Pmode.
      Convert to Pmode so we can index with it.  */
index 05ad48f6cbee09ba63b426d9887aa2f8f07b2c6a..764e0818a8a101221992542d8e2a278e9679dd16 100644 (file)
@@ -302,8 +302,7 @@ extern int have_sub2_insn PARAMS ((rtx, rtx));
 /* Emit a pair of rtl insns to compare two rtx's and to jump 
    to a label if the comparison is true.  */
 extern void emit_cmp_and_jump_insns PARAMS ((rtx, rtx, enum rtx_code, rtx,
-                                            enum machine_mode, int,
-                                            unsigned int, rtx));
+                                            enum machine_mode, int, rtx));
 
 /* Generate code to indirectly jump to a location given in the rtx LOC.  */
 extern void emit_indirect_jump PARAMS ((rtx));
@@ -542,10 +541,10 @@ extern void do_jump PARAMS ((tree, rtx, rtx));
 
 /* Generate rtl to compare two rtx's, will call emit_cmp_insn.  */
 extern rtx compare_from_rtx PARAMS ((rtx, rtx, enum rtx_code, int,
-                                    enum machine_mode, rtx, unsigned int));
+                                    enum machine_mode, rtx));
 extern void do_compare_rtx_and_jump PARAMS ((rtx, rtx, enum rtx_code, int,
                                             enum machine_mode, rtx,
-                                            unsigned int, rtx, rtx));
+                                            rtx, rtx));
 
 /* Two different ways of generating switch statements.  */
 extern int try_casesi    PARAMS ((tree, tree, tree, tree, rtx, rtx));
index d6769d6f2328fd231c780c3d32f1e9915562d7a2..f7cdc57d42133d8cafa7329bf1a35caea902f289 100644 (file)
@@ -3025,7 +3025,6 @@ optimize_bit_field_compare (code, compare_type, lhs, rhs)
   enum machine_mode lmode, rmode, nmode;
   int lunsignedp, runsignedp;
   int lvolatilep = 0, rvolatilep = 0;
-  unsigned int alignment;
   tree linner, rinner = NULL_TREE;
   tree mask;
   tree offset;
@@ -3036,7 +3035,7 @@ optimize_bit_field_compare (code, compare_type, lhs, rhs)
      do anything if the inner expression is a PLACEHOLDER_EXPR since we
      then will no longer be able to replace it.  */
   linner = get_inner_reference (lhs, &lbitsize, &lbitpos, &offset, &lmode,
-                               &lunsignedp, &lvolatilep, &alignment);
+                               &lunsignedp, &lvolatilep);
   if (linner == lhs || lbitsize == GET_MODE_BITSIZE (lmode) || lbitsize < 0
       || offset != 0 || TREE_CODE (linner) == PLACEHOLDER_EXPR)
     return 0;
@@ -3046,7 +3045,7 @@ optimize_bit_field_compare (code, compare_type, lhs, rhs)
      /* If this is not a constant, we can only do something if bit positions,
        sizes, and signedness are the same.  */
      rinner = get_inner_reference (rhs, &rbitsize, &rbitpos, &offset, &rmode,
-                                  &runsignedp, &rvolatilep, &alignment);
+                                  &runsignedp, &rvolatilep);
 
      if (rinner == rhs || lbitpos != rbitpos || lbitsize != rbitsize
         || lunsignedp != runsignedp || offset != 0
@@ -3204,7 +3203,6 @@ decode_field_reference (exp, pbitsize, pbitpos, pmode, punsignedp,
   tree mask, inner, offset;
   tree unsigned_type;
   unsigned int precision;
-  unsigned int alignment;
 
   /* All the optimizations using this function assume integer fields.
      There are problems with FP fields since the type_for_size call
@@ -3224,7 +3222,7 @@ decode_field_reference (exp, pbitsize, pbitpos, pmode, punsignedp,
     }
 
   inner = get_inner_reference (exp, pbitsize, pbitpos, &offset, pmode,
-                              punsignedp, pvolatilep, &alignment);
+                              punsignedp, pvolatilep);
   if ((inner == exp && and_mask == 0)
       || *pbitsize < 0 || offset != 0
       || TREE_CODE (inner) == PLACEHOLDER_EXPR)
index eeea78c4aede7de32dd8c231971a5b4daee979e8..4d382856138b4a5a1631b347189dc2e60b7c9ede 100644 (file)
@@ -231,8 +231,6 @@ struct insns_for_mem_entry
 
 static rtx assign_stack_local_1 PARAMS ((enum machine_mode, HOST_WIDE_INT,
                                         int, struct function *));
-static rtx assign_stack_temp_for_type PARAMS ((enum machine_mode,
-                                              HOST_WIDE_INT, int, tree));
 static struct temp_slot *find_temp_slot_from_address  PARAMS ((rtx));
 static void put_reg_into_stack PARAMS ((struct function *, rtx, tree,
                                         enum machine_mode, enum machine_mode,
@@ -629,7 +627,7 @@ assign_stack_local (mode, size, align)
 
    TYPE is the type that will be used for the stack slot.  */
 
-static rtx
+rtx
 assign_stack_temp_for_type (mode, size, keep, type)
      enum machine_mode mode;
      HOST_WIDE_INT size;
index 6acdb9cb050eb49979d696274fea731f3bffe30f..3c5a701a75f21cfec49219b40ac72abeb4ea9e0f 100644 (file)
@@ -7663,7 +7663,7 @@ check_dbra_loop (loop, insn_count)
              /* Add new compare/branch insn at end of loop.  */
              start_sequence ();
              emit_cmp_and_jump_insns (reg, const0_rtx, cmp_code, NULL_RTX,
-                                      GET_MODE (reg), 0, 0,
+                                      GET_MODE (reg), 0,
                                       XEXP (jump_label, 0));
              tem = gen_sequence ();
              end_sequence ();
index 28e227b60f9bbf3cea73071e4f908a330502e5c7..e26a046dc71ac705fc5d6cd48de7e76c182af6a3 100644 (file)
@@ -96,10 +96,14 @@ static int expand_cmplxdiv_wide PARAMS ((rtx, rtx, rtx, rtx,
                                       rtx, rtx, enum machine_mode,
                                       int, enum optab_methods,
                                       enum mode_class, optab));
+static void prepare_cmp_insn PARAMS ((rtx *, rtx *, enum rtx_code *, rtx,
+                                     enum machine_mode *, int *,
+                                     enum can_compare_purpose));
 static enum insn_code can_fix_p        PARAMS ((enum machine_mode, enum machine_mode,
                                       int, int *));
-static enum insn_code can_float_p PARAMS ((enum machine_mode, enum machine_mode,
-                                        int));
+static enum insn_code can_float_p PARAMS ((enum machine_mode,
+                                          enum machine_mode,
+                                          int));
 static rtx ftruncify   PARAMS ((rtx));
 static optab new_optab PARAMS ((void));
 static inline optab init_optab PARAMS ((enum rtx_code));
@@ -352,7 +356,6 @@ expand_cmplxdiv_wide (real0, real1, imag0, imag1, realr, imagr, submode,
   rtx real_t, imag_t;
   rtx temp1, temp2, lab1, lab2;
   enum machine_mode mode;
-  int align;
   rtx res;
   optab this_add_optab = add_optab;
   optab this_sub_optab = sub_optab;
@@ -392,10 +395,9 @@ expand_cmplxdiv_wide (real0, real1, imag0, imag1, realr, imagr, submode,
     return 0;
 
   mode = GET_MODE (temp1);
-  align = GET_MODE_ALIGNMENT (mode);
   lab1 = gen_label_rtx ();
   emit_cmp_and_jump_insns (temp1, temp2, LT, NULL_RTX,
-                          mode, unsignedp, align, lab1);
+                          mode, unsignedp, lab1);
 
   /* |c| >= |d|; use ratio d/c to scale dividend and divisor.  */
 
@@ -2419,7 +2421,7 @@ expand_abs (mode, op0, target, result_unsignedp, safe)
                                  NULL_RTX, op1);
   else
     do_compare_rtx_and_jump (target, CONST0_RTX (mode), GE, 0, mode,
-                            NULL_RTX, 0, NULL_RTX, op1);
+                            NULL_RTX, NULL_RTX, op1);
 
   op0 = expand_unop (mode, result_unsignedp ? neg_optab : negv_optab,
                      target, target, 0);
@@ -3035,8 +3037,7 @@ can_compare_p (code, mode, purpose)
    *PUNSIGNEDP nonzero says that the operands are unsigned;
    this matters if they need to be widened.
 
-   If they have mode BLKmode, then SIZE specifies the size of both operands,
-   and ALIGN specifies the known shared alignment of the operands.
+   If they have mode BLKmode, then SIZE specifies the size of both operands.
 
    This function performs all the setup necessary so that the caller only has
    to emit a single comparison insn.  This setup can involve doing a BLKmode
@@ -3045,22 +3046,19 @@ can_compare_p (code, mode, purpose)
    The values which are passed in through pointers can be modified; the caller
    should perform the comparison on the modified values.  */
 
-void
-prepare_cmp_insn (px, py, pcomparison, size, pmode, punsignedp, align,
-                 purpose)
+static void
+prepare_cmp_insn (px, py, pcomparison, size, pmode, punsignedp, purpose)
      rtx *px, *py;
      enum rtx_code *pcomparison;
      rtx size;
      enum machine_mode *pmode;
      int *punsignedp;
-     int align ATTRIBUTE_UNUSED;
      enum can_compare_purpose purpose;
 {
   enum machine_mode mode = *pmode;
   rtx x = *px, y = *py;
   int unsignedp = *punsignedp;
   enum mode_class class;
-  rtx opalign ATTRIBUTE_UNUSED = GEN_INT (align / BITS_PER_UNIT);;
 
   class = GET_MODE_CLASS (mode);
 
@@ -3103,6 +3101,8 @@ prepare_cmp_insn (px, py, pcomparison, size, pmode, punsignedp, align,
     {
       rtx result;
       enum machine_mode result_mode;
+      unsigned int opalign ATTRIBUTE_UNUSED
+       = (MIN (MEM_ALIGN (x), MEM_ALIGN (y)) / BITS_PER_UNIT);
 
       emit_queue ();
       x = protect_from_queue (x, 0);
@@ -3193,8 +3193,7 @@ prepare_cmp_insn (px, py, pcomparison, size, pmode, punsignedp, align,
       if (unsignedp && ucmp_optab->handlers[(int) mode].libfunc)
        libfunc = ucmp_optab->handlers[(int) mode].libfunc;
 
-      emit_library_call (libfunc, 1,
-                        word_mode, 2, x, mode, y, mode);
+      emit_library_call (libfunc, 1, word_mode, 2, x, mode, y, mode);
 
       /* Immediately move the result of the libcall into a pseudo
         register so reload doesn't clobber the value if it needs
@@ -3322,8 +3321,7 @@ emit_cmp_and_jump_insn_1 (x, y, mode, comparison, unsignedp, label)
    need to be widened by emit_cmp_insn.  UNSIGNEDP is also used to select
    the proper branch condition code.
 
-   If X and Y have mode BLKmode, then SIZE specifies the size of both X and Y,
-   and ALIGN specifies the known shared alignment of X and Y. 
+   If X and Y have mode BLKmode, then SIZE specifies the size of both X and Y.
 
    MODE is the mode of the inputs (in case they are const_int).
 
@@ -3332,13 +3330,12 @@ emit_cmp_and_jump_insn_1 (x, y, mode, comparison, unsignedp, label)
    unsigned variant based on UNSIGNEDP to select a proper jump instruction.  */
 
 void
-emit_cmp_and_jump_insns (x, y, comparison, size, mode, unsignedp, align, label)
+emit_cmp_and_jump_insns (x, y, comparison, size, mode, unsignedp, label)
      rtx x, y;
      enum rtx_code comparison;
      rtx size;
      enum machine_mode mode;
      int unsignedp;
-     unsigned int align;
      rtx label;
 {
   rtx op0 = x, op1 = y;
@@ -3366,7 +3363,8 @@ emit_cmp_and_jump_insns (x, y, comparison, size, mode, unsignedp, align, label)
   emit_queue ();
   if (unsignedp)
     comparison = unsigned_condition (comparison);
-  prepare_cmp_insn (&op0, &op1, &comparison, size, &mode, &unsignedp, align,
+
+  prepare_cmp_insn (&op0, &op1, &comparison, size, &mode, &unsignedp,
                    ccp_jump);
   emit_cmp_and_jump_insn_1 (op0, op1, mode, comparison, unsignedp, label);
 }
@@ -3374,15 +3372,14 @@ emit_cmp_and_jump_insns (x, y, comparison, size, mode, unsignedp, align, label)
 /* Like emit_cmp_and_jump_insns, but generate only the comparison.  */
 
 void
-emit_cmp_insn (x, y, comparison, size, mode, unsignedp, align)
+emit_cmp_insn (x, y, comparison, size, mode, unsignedp)
      rtx x, y;
      enum rtx_code comparison;
      rtx size;
      enum machine_mode mode;
      int unsignedp;
-     unsigned int align;
 {
-  emit_cmp_and_jump_insns (x, y, comparison, size, mode, unsignedp, align, 0);
+  emit_cmp_and_jump_insns (x, y, comparison, size, mode, unsignedp, 0);
 }
 \f
 /* Emit a library call comparison between floating point X and Y.
@@ -3738,7 +3735,7 @@ emit_conditional_move (target, code, op0, op1, cmode, op2, op3, mode,
      and then the conditional move.  */
 
   comparison 
-    = compare_from_rtx (op0, op1, code, unsignedp, cmode, NULL_RTX, 0);
+    = compare_from_rtx (op0, op1, code, unsignedp, cmode, NULL_RTX);
 
   /* ??? Watch for const0_rtx (nop) and const_true_rtx (unconditional)?  */
   /* We can get const0_rtx or const_true_rtx in some circumstances.  Just
@@ -4169,7 +4166,7 @@ expand_float (to, from, unsignedp)
 
              /* Test whether the sign bit is set.  */
              emit_cmp_and_jump_insns (from, const0_rtx, LT, NULL_RTX, imode,
-                                      0, 0, neglabel);
+                                      0, neglabel);
 
              /* The sign bit is not set.  Convert as signed.  */
              expand_float (target, from, 0);
@@ -4217,7 +4214,7 @@ expand_float (to, from, unsignedp)
 
       do_pending_stack_adjust ();
       emit_cmp_and_jump_insns (from, const0_rtx, GE, NULL_RTX, GET_MODE (from),
-                               0, 0, label);
+                              0, label);
 
       /* On SCO 3.2.1, ldexp rejects values outside [0.5, 1).
         Rather than setting up a dconst_dot_5, let's hope SCO
@@ -4425,7 +4422,7 @@ expand_fix (to, from, unsignedp)
          /* See if we need to do the subtraction.  */
          do_pending_stack_adjust ();
          emit_cmp_and_jump_insns (from, limit, GE, NULL_RTX, GET_MODE (from),
-                                  0, 0, lab1);
+                                  0, lab1);
 
          /* If not, do the signed "fix" and branch around fixup code.  */
          expand_fix (to, from, 0);
index afedbf72bcc1b4e9b03aa084bfa70a1d65546bac..0c488b8bc5a37c6fa91ef5b033aede69ed08d392 100644 (file)
@@ -291,7 +291,7 @@ extern void emit_0_to_1_insn PARAMS ((rtx));
 
 /* Emit one rtl insn to compare two rtx's.  */
 extern void emit_cmp_insn PARAMS ((rtx, rtx, enum rtx_code, rtx,
-                                  enum machine_mode, int, unsigned int));
+                                  enum machine_mode, int));
 
 /* The various uses that a comparison can have; used by can_compare_p:
    jumps, conditional moves, store flag operations.  */
@@ -307,10 +307,6 @@ enum can_compare_purpose
 extern int can_compare_p PARAMS ((enum rtx_code, enum machine_mode,
                                  enum can_compare_purpose));
 
-extern void prepare_cmp_insn PARAMS ((rtx *, rtx *, enum rtx_code *, rtx,
-                                     enum machine_mode *, int *, int,
-                                     enum can_compare_purpose));
-
 extern rtx prepare_operand PARAMS ((int, rtx, int, enum machine_mode,
                                    enum machine_mode, int));
 
index 01e0fb6ec72568e7856b363101dbd615b0ff6c8e..7cc1843ca9318addf051fe24cdf6d3e3e10efed7 100644 (file)
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -1289,6 +1289,8 @@ extern rtx assign_stack_local             PARAMS ((enum machine_mode,
                                               HOST_WIDE_INT, int));
 extern rtx assign_stack_temp           PARAMS ((enum machine_mode,
                                               HOST_WIDE_INT, int));
+extern rtx assign_stack_temp_for_type  PARAMS ((enum machine_mode,
+                                                HOST_WIDE_INT, int, tree));
 extern rtx assign_temp                 PARAMS ((tree, int, int, int));
 /* In emit-rtl.c */
 extern rtx emit_insn_before            PARAMS ((rtx, rtx));
@@ -1682,6 +1684,15 @@ extern rtx gen_lowpart_SUBREG PARAMS ((enum machine_mode, rtx));
 
 #define LAST_VIRTUAL_REGISTER          ((FIRST_VIRTUAL_REGISTER) + 4)
 
+/* Nonzero if REGNUM is a pointer into the stack frame.  */
+#define REGNO_PTR_FRAME_P(REGNUM)              \
+  ((REGNUM) == STACK_POINTER_REGNUM            \
+   || (REGNUM) == FRAME_POINTER_REGNUM         \
+   || (REGNUM) == HARD_FRAME_POINTER_REGNUM    \
+   || (REGNUM) == ARG_POINTER_REGNUM           \
+   || ((REGNUM) >= FIRST_VIRTUAL_REGISTER      \
+       && (REGNUM) <= LAST_VIRTUAL_REGISTER))
+
 /* REGNUM never really appearing in the INSN stream.  */
 #define INVALID_REGNUM                 (~(unsigned int)0)
 
index 4fa32801aa15fb565191f88e372082612f73d788..4fa60e7f5194a821baa0a36e52ec07b61e3b01e9 100644 (file)
@@ -2577,7 +2577,7 @@ extern tree maybe_build_cleanup           PARAMS ((tree));
 extern tree get_inner_reference                PARAMS ((tree, HOST_WIDE_INT *,
                                                 HOST_WIDE_INT *, tree *,
                                                 enum machine_mode *, int *,
-                                                int *, unsigned int *));
+                                                int *));
 
 /* Given a DECL or TYPE, return the scope in which it was declared, or
    NUL_TREE if there is no containing scope.  */