This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Measuring alignment


Yesterday I fixed my last bug relating to the fact that half of the
routines accept alignment in bits and the other half in bytes.  So
I committed the following (a fixed about half a dozen so-far-undetected
bugs in the process).  I also used host_integerp in a few more places.

Thu Mar 30 06:32:51 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* builtins.c (get_pointer_alignment): Use host_integerp & tree_low_cst.
	(expand_builtin_apply): Pass alignment to emit_block_move in bits.
	(expand_builtin_memcpy, expand_builtin_va_copy): Likewise.
	(expand_builtin_memset): Likewise, but to clear_storage.
	* calls.c (save_fixed_argument_area): Likewise, to move_by_pieces.
	(restore_fixed_argument_area): Likewise.
	(store_unaligned_arguments_into_pseudos): Likewise, to store_bit_field.
	(load_register_parameters): Likewise, to emit_group_load.
	(expand_call): Likewise, to emit_group_store and emit_block_move.
	(emit_library_call_value_1): Likewise, to emit_block_move.
	(store_one_arg): Likewise, and to emit_push_insn.
	* expmed.c (extract_bit_field): Alignment is in bits, not bytes.
	(extract_fixed_bit_field, extract_split_bit_field): Likewise.
	* expr.c (move_by_pieces, move_by_pieces_ninsns): Likewise.
	(emit_block_move, emit_group_load, emit_group_store): Likewise.
	(clear_by_pieces, clear_storage, emit_push_insn): Likewise.
	(expand_assigment, store_expr, store_constructor_field): Likewise.
	(expand_expr_unaligned, do_jump, do_compare_and_jump): Likewise.
	(store_constructor, store_field, get_inner_reference): Likewise.
	Use host_integerp and tree_low_cst; sizes and positions HOST_WIDE_INT.
	(expand_expr, case COMPONENT_REF): Likewise.
	(copy_blkmode_from_regs): Use UNSIGNED_HOST_WIDE_INT for sizes
	and positions; reindent code.
	* expr.h (emit_cmp_insn, emit_cmp_and_jump_insns): Alignment unsigned.
	* function.c (purge_addressof_1): Pass bit align to store_bit_field.
	(assign_parms): Likewise to emit_group_store.
	* optbas.c (prepare_cmp_insn): Alignment is in bits.
	(emit_cmp_and_jump_insns, emit_cmp_insn): Likewise, and also unsigned.
	* stmt.c (expand_value_return): Pass align in bits to emit_group_load.
	(expand_return): Likewise to {extract,store}_bit_field.
	* stor-layout.c (get_mode_alignment): Minor cleanup.
	* config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Align is in bits.
	* config/sh/sh.h (MOVE_BY_PIECES_P): Likewise.
	* ch/expr.c (chill_expand_expr): Pass bit alignment to emit_block_move.

*** builtins.c	2000/03/30 00:03:14	1.42
--- builtins.c	2000/03/30 11:19:20
*************** get_pointer_alignment (exp, max_align)
*** 136,139 ****
--- 136,140 ----
  	  if (TREE_CODE (TREE_TYPE (exp)) != POINTER_TYPE)
  	    return align;
+ 
  	  inner = TYPE_ALIGN (TREE_TYPE (TREE_TYPE (exp)));
  	  align = MIN (inner, max_align);
*************** get_pointer_alignment (exp, max_align)
*** 144,151 ****
  	     imposed by the integer.  If not, we can't do any better than
  	     ALIGN.  */
! 	  if (TREE_CODE (TREE_OPERAND (exp, 1)) != INTEGER_CST)
  	    return align;
  
! 	  while (((TREE_INT_CST_LOW (TREE_OPERAND (exp, 1)) * BITS_PER_UNIT)
  		  & (max_align - 1))
  		 != 0)
--- 145,152 ----
  	     imposed by the integer.  If not, we can't do any better than
  	     ALIGN.  */
! 	  if (! host_integerp (TREE_OPERAND (exp, 1), 1))
  	    return align;
  
! 	  while (((tree_low_cst (TREE_OPERAND (exp, 1), 1) * BITS_PER_UNIT)
  		  & (max_align - 1))
  		 != 0)
*************** expand_builtin_apply (function, argument
*** 904,909 ****
    emit_block_move (gen_rtx_MEM (BLKmode, dest),
  		   gen_rtx_MEM (BLKmode, incoming_args),
! 		   argsize,
! 		   PARM_BOUNDARY / BITS_PER_UNIT);
  
    /* Refer to the argument block.  */
--- 905,909 ----
    emit_block_move (gen_rtx_MEM (BLKmode, dest),
  		   gen_rtx_MEM (BLKmode, incoming_args),
! 		   argsize, PARM_BOUNDARY);
  
    /* Refer to the argument block.  */
*************** expand_builtin_memcpy (arglist)
*** 1436,1443 ****
        tree len = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist)));
  
!       int src_align
! 	= get_pointer_alignment (src, BIGGEST_ALIGNMENT) / BITS_PER_UNIT;
!       int dest_align
! 	= get_pointer_alignment (dest, BIGGEST_ALIGNMENT) / BITS_PER_UNIT;
        rtx dest_mem, src_mem, dest_addr, len_rtx;
  
--- 1436,1441 ----
        tree len = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist)));
  
!       int src_align = get_pointer_alignment (src, BIGGEST_ALIGNMENT);
!       int dest_align = get_pointer_alignment (dest, BIGGEST_ALIGNMENT);
        rtx dest_mem, src_mem, dest_addr, len_rtx;
  
*************** expand_builtin_memset (exp)
*** 1532,1537 ****
        tree len = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist)));
  
!       int dest_align
! 	= get_pointer_alignment (dest, BIGGEST_ALIGNMENT) / BITS_PER_UNIT;
        rtx dest_mem, dest_addr, len_rtx;
  
--- 1530,1534 ----
        tree len = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist)));
  
!       int dest_align = get_pointer_alignment (dest, BIGGEST_ALIGNMENT);
        rtx dest_mem, dest_addr, len_rtx;
  
*************** stabilize_va_list (valist, needs_lvalue)
*** 1919,1922 ****
--- 1916,1920 ----
   	  tree p1 = build_pointer_type (TREE_TYPE (va_list_type_node));
   	  tree p2 = build_pointer_type (va_list_type_node);
+ 
   	  valist = build1 (ADDR_EXPR, p2, valist);
  	  valist = fold (build1 (NOP_EXPR, p1, valist));
*************** expand_builtin_va_copy (arglist)
*** 2191,2196 ****
  
        /* Copy.  */
!       emit_block_move (dstb, srcb, size, 
! 		       TYPE_ALIGN (va_list_type_node) / BITS_PER_UNIT);
      }
  
--- 2189,2193 ----
  
        /* Copy.  */
!       emit_block_move (dstb, srcb, size, TYPE_ALIGN (va_list_type_node));
      }
  
*** calls.c	2000/03/29 22:46:03	1.109
--- calls.c	2000/03/30 11:19:27
*************** save_fixed_argument_area (reg_parm_stack
*** 857,865 ****
  	{
  	  save_area = assign_stack_temp (BLKmode, num_to_save, 0);
! 	  /* Cannot use emit_block_move here because it can be done by a library
! 	     call which in turn gets into this place again and deadly infinite
! 	     recursion happens.  */
  	  move_by_pieces (validize_mem (save_area), stack_area, num_to_save,
! 			  PARM_BOUNDARY / BITS_PER_UNIT);
  	}
        else
--- 857,865 ----
  	{
  	  save_area = assign_stack_temp (BLKmode, num_to_save, 0);
! 	  /* Cannot use emit_block_move here because it can be done by a
! 	     library call which in turn gets into this place again and deadly
! 	     infinite recursion happens.  */
  	  move_by_pieces (validize_mem (save_area), stack_area, num_to_save,
! 			  PARM_BOUNDARY);
  	}
        else
*************** restore_fixed_argument_area (save_area, 
*** 901,906 ****
         recursion happens.  */
      move_by_pieces (stack_area, validize_mem (save_area),
! 		    high_to_save - low_to_save + 1,
! 		    PARM_BOUNDARY / BITS_PER_UNIT);
  }
  #endif
--- 901,905 ----
         recursion happens.  */
      move_by_pieces (stack_area, validize_mem (save_area),
! 		    high_to_save - low_to_save + 1, PARM_BOUNDARY);
  }
  #endif
*************** store_unaligned_arguments_into_pseudos (
*** 969,978 ****
  	    bytes -= bitsize / BITS_PER_UNIT;
  	    store_bit_field (reg, bitsize, big_endian_correction, word_mode,
! 			     extract_bit_field (word, bitsize, 0, 1,
! 						NULL_RTX, word_mode,
! 						word_mode,
! 						bitalign / BITS_PER_UNIT,
  						BITS_PER_WORD),
! 			     bitalign / BITS_PER_UNIT, BITS_PER_WORD);
  	  }
        }
--- 968,975 ----
  	    bytes -= bitsize / BITS_PER_UNIT;
  	    store_bit_field (reg, bitsize, big_endian_correction, word_mode,
! 			     extract_bit_field (word, bitsize, 0, 1, NULL_RTX,
! 						word_mode, word_mode, bitalign,
  						BITS_PER_WORD),
! 			     bitalign, BITS_PER_WORD);
  	  }
        }
*************** load_register_parameters (args, num_actu
*** 1657,1666 ****
  
  	  if (GET_CODE (reg) == PARALLEL)
! 	    {
! 	      emit_group_load (reg, args[i].value,
! 			       int_size_in_bytes (TREE_TYPE (args[i].tree_value)),
! 			       (TYPE_ALIGN (TREE_TYPE (args[i].tree_value))
! 				/ BITS_PER_UNIT));
! 	    }
  
  	  /* If simple case, just do move.  If normal partial, store_one_arg
--- 1654,1660 ----
  
  	  if (GET_CODE (reg) == PARALLEL)
! 	    emit_group_load (reg, args[i].value,
! 			     int_size_in_bytes (TREE_TYPE (args[i].tree_value)),
! 			     TYPE_ALIGN (TREE_TYPE (args[i].tree_value)));
  
  	  /* If simple case, just do move.  If normal partial, store_one_arg
*************** expand_call (exp, target, ignore)
*** 2912,2916 ****
  	  if (! rtx_equal_p (target, valreg))
  	    emit_group_store (target, valreg, bytes,
! 			      TYPE_ALIGN (TREE_TYPE (exp)) / BITS_PER_UNIT);
  	  /* We can not support sibling calls for this case.  */
  	  sibcall_failure = 1;
--- 2906,2911 ----
  	  if (! rtx_equal_p (target, valreg))
  	    emit_group_store (target, valreg, bytes,
! 			      TYPE_ALIGN (TREE_TYPE (exp)));
! 
  	  /* We can not support sibling calls for this case.  */
  	  sibcall_failure = 1;
*************** expand_call (exp, target, ignore)
*** 2993,2997 ****
  				   validize_mem (args[i].save_area),
  				   GEN_INT (args[i].size.constant),
! 				   PARM_BOUNDARY / BITS_PER_UNIT);
  		sibcall_failure = 1;
  	      }
--- 2988,2992 ----
  				   validize_mem (args[i].save_area),
  				   GEN_INT (args[i].size.constant),
! 				   PARM_BOUNDARY);
  		sibcall_failure = 1;
  	      }
*************** emit_library_call_value_1 (retval, orgfu
*** 3475,3480 ****
  	      save_area = assign_stack_temp (BLKmode, num_to_save, 0);
  	      emit_block_move (validize_mem (save_area), stack_area,
! 			       GEN_INT (num_to_save),
! 			       PARM_BOUNDARY / BITS_PER_UNIT);
  	    }
  	  else
--- 3470,3474 ----
  	      save_area = assign_stack_temp (BLKmode, num_to_save, 0);
  	      emit_block_move (validize_mem (save_area), stack_area,
! 			       GEN_INT (num_to_save), PARM_BOUNDARY);
  	    }
  	  else
*************** emit_library_call_value_1 (retval, orgfu
*** 3541,3544 ****
--- 3535,3539 ----
  		}
  	    }
+ 
  	  emit_push_insn (val, mode, NULL_TREE, NULL_RTX, 0, partial, reg, 0,
  			  argblock, GEN_INT (argvec[argnum].offset.constant),
*************** emit_library_call_value_1 (retval, orgfu
*** 3685,3689 ****
  	    emit_block_move (stack_area, validize_mem (save_area),
  			     GEN_INT (high_to_save - low_to_save + 1),
! 				 PARM_BOUNDARY / BITS_PER_UNIT);
  	}
  #endif
--- 3680,3684 ----
  	    emit_block_move (stack_area, validize_mem (save_area),
  			     GEN_INT (high_to_save - low_to_save + 1),
! 			     PARM_BOUNDARY);
  	}
  #endif
*************** store_one_arg (arg, argblock, may_be_all
*** 3923,3927 ****
  		  emit_block_move (validize_mem (arg->save_area), stack_area,
  				   GEN_INT (arg->size.constant),
! 				   PARM_BOUNDARY / BITS_PER_UNIT);
  		}
  	      else
--- 3918,3922 ----
  		  emit_block_move (validize_mem (arg->save_area), stack_area,
  				   GEN_INT (arg->size.constant),
! 				   PARM_BOUNDARY);
  		}
  	      else
*************** store_one_arg (arg, argblock, may_be_all
*** 4085,4090 ****
  
        emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval), size_rtx,
! 		      TYPE_ALIGN (TREE_TYPE (pval)) / BITS_PER_UNIT, partial,
! 		      reg, excess, argblock, ARGS_SIZE_RTX (arg->offset),
  		      reg_parm_stack_space,
  		      ARGS_SIZE_RTX (arg->alignment_pad));
--- 4080,4085 ----
  
        emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval), size_rtx,
! 		      TYPE_ALIGN (TREE_TYPE (pval)), partial, reg, excess,
! 		      argblock, ARGS_SIZE_RTX (arg->offset),
  		      reg_parm_stack_space,
  		      ARGS_SIZE_RTX (arg->alignment_pad));
*** expmed.c	2000/03/26 16:46:26	1.53
--- expmed.c	2000/03/30 11:19:35
*************** store_split_bit_field (op0, bitsize, bit
*** 948,952 ****
     but the value may be returned with type MODE instead.
  
!    ALIGN is the alignment that STR_RTX is known to have, measured in bytes.
     TOTAL_SIZE is the size in bytes of the containing structure,
     or -1 if varying.
--- 948,952 ----
     but the value may be returned with type MODE instead.
  
!    ALIGN is the alignment that STR_RTX is known to have.
     TOTAL_SIZE is the size in bytes of the containing structure,
     or -1 if varying.
*************** extract_bit_field (str_rtx, bitsize, bit
*** 1069,1073 ****
  	   && (! SLOW_UNALIGNED_ACCESS (mode, align)
  	       || (offset * BITS_PER_UNIT % bitsize == 0
! 		   && align * BITS_PER_UNIT % bitsize == 0))))
        && ((bitsize >= BITS_PER_WORD && bitsize == GET_MODE_BITSIZE (mode)
  	   && bitpos % BITS_PER_WORD == 0)
--- 1069,1073 ----
  	   && (! SLOW_UNALIGNED_ACCESS (mode, align)
  	       || (offset * BITS_PER_UNIT % bitsize == 0
! 		   && align % bitsize == 0))))
        && ((bitsize >= BITS_PER_WORD && bitsize == GET_MODE_BITSIZE (mode)
  	   && bitpos % BITS_PER_WORD == 0)
*************** extract_bit_field (str_rtx, bitsize, bit
*** 1145,1151 ****
  	    = extract_bit_field (op0, MIN (BITS_PER_WORD,
  					   bitsize - i * BITS_PER_WORD),
! 				 bitnum + bit_offset,
! 				 1, target_part, mode, word_mode,
! 				 align, total_size);
  
  	  if (target_part == 0)
--- 1145,1150 ----
  	    = extract_bit_field (op0, MIN (BITS_PER_WORD,
  					   bitsize - i * BITS_PER_WORD),
! 				 bitnum + bit_offset, 1, target_part, mode,
! 				 word_mode, align, total_size);
  
  	  if (target_part == 0)
*************** extract_bit_field (str_rtx, bitsize, bit
*** 1263,1268 ****
  		      || (GET_MODE_SIZE (GET_MODE (op0))
  			  > GET_MODE_SIZE (maxmode)))
! 		    bestmode = get_best_mode (bitsize, bitnum,
! 					      align * BITS_PER_UNIT, maxmode,
  					      MEM_VOLATILE_P (xop0));
  		  else
--- 1262,1266 ----
  		      || (GET_MODE_SIZE (GET_MODE (op0))
  			  > GET_MODE_SIZE (maxmode)))
! 		    bestmode = get_best_mode (bitsize, bitnum, align, maxmode,
  					      MEM_VOLATILE_P (xop0));
  		  else
*************** extract_bit_field (str_rtx, bitsize, bit
*** 1271,1275 ****
  		  if (bestmode == VOIDmode
  		      || (SLOW_UNALIGNED_ACCESS (bestmode, align)
! 			  && GET_MODE_SIZE (bestmode) > align))
  		    goto extzv_loses;
  
--- 1269,1273 ----
  		  if (bestmode == VOIDmode
  		      || (SLOW_UNALIGNED_ACCESS (bestmode, align)
! 			  && GET_MODE_BITSIZE (bestmode) > align))
  		    goto extzv_loses;
  
*************** extract_bit_field (str_rtx, bitsize, bit
*** 1401,1406 ****
  		      || (GET_MODE_SIZE (GET_MODE (op0))
  			  > GET_MODE_SIZE (maxmode)))
! 		    bestmode = get_best_mode (bitsize, bitnum,
! 					      align * BITS_PER_UNIT, maxmode,
  					      MEM_VOLATILE_P (xop0));
  		  else
--- 1399,1403 ----
  		      || (GET_MODE_SIZE (GET_MODE (op0))
  			  > GET_MODE_SIZE (maxmode)))
! 		    bestmode = get_best_mode (bitsize, bitnum, align, maxmode,
  					      MEM_VOLATILE_P (xop0));
  		  else
*************** extract_bit_field (str_rtx, bitsize, bit
*** 1409,1413 ****
  		  if (bestmode == VOIDmode
  		      || (SLOW_UNALIGNED_ACCESS (bestmode, align)
! 			  && GET_MODE_SIZE (bestmode) > align))
  		    goto extv_loses;
  
--- 1406,1410 ----
  		  if (bestmode == VOIDmode
  		      || (SLOW_UNALIGNED_ACCESS (bestmode, align)
! 			  && GET_MODE_BITSIZE (bestmode) > align))
  		    goto extv_loses;
  
*************** extract_bit_field (str_rtx, bitsize, bit
*** 1539,1543 ****
     If TARGET is not used, create a pseudo-reg of mode TMODE for the value.
  
!    ALIGN is the alignment that STR_RTX is known to have, measured in bytes.  */
  
  static rtx
--- 1536,1540 ----
     If TARGET is not used, create a pseudo-reg of mode TMODE for the value.
  
!    ALIGN is the alignment that STR_RTX is known to have.  */
  
  static rtx
*************** extract_fixed_bit_field (tmode, op0, off
*** 1566,1571 ****
  	 a word, we won't be doing the extraction the normal way.  */
  
!       mode = get_best_mode (bitsize, bitpos + offset * BITS_PER_UNIT,
! 			    align * BITS_PER_UNIT, word_mode,
  			    GET_CODE (op0) == MEM && MEM_VOLATILE_P (op0));
  
--- 1563,1568 ----
  	 a word, we won't be doing the extraction the normal way.  */
  
!       mode = get_best_mode (bitsize, bitpos + offset * BITS_PER_UNIT, align,
! 			    word_mode,
  			    GET_CODE (op0) == MEM && MEM_VOLATILE_P (op0));
  
*************** lshift_value (mode, value, bitpos, bitsi
*** 1760,1765 ****
     UNSIGNEDP is 1 if should zero-extend the contents; else sign-extend.
  
!    ALIGN is the known alignment of OP0, measured in bytes.
!    This is also the size of the memory objects to be used.  */
  
  static rtx
--- 1757,1762 ----
     UNSIGNEDP is 1 if should zero-extend the contents; else sign-extend.
  
!    ALIGN is the known alignment of OP0.  This is also the size of the
!    memory objects to be used.  */
  
  static rtx
*************** extract_split_bit_field (op0, bitsize, b
*** 1780,1784 ****
      unit = BITS_PER_WORD;
    else
!     unit = MIN (align * BITS_PER_UNIT, BITS_PER_WORD);
  
    while (bitsdone < bitsize)
--- 1777,1781 ----
      unit = BITS_PER_WORD;
    else
!     unit = MIN (align, BITS_PER_WORD);
  
    while (bitsdone < bitsize)
*** expr.c	2000/03/29 13:10:41	1.223
--- expr.c	2000/03/30 11:20:02
*************** static char direct_store[NUM_MACHINE_MOD
*** 205,210 ****
     to perform a structure copy. */
  #ifndef MOVE_BY_PIECES_P
! #define MOVE_BY_PIECES_P(SIZE, ALIGN) (move_by_pieces_ninsns        \
!                                        (SIZE, ALIGN) < MOVE_RATIO)
  #endif
  
--- 205,210 ----
     to perform a structure copy. */
  #ifndef MOVE_BY_PIECES_P
! #define MOVE_BY_PIECES_P(SIZE, ALIGN) \
!   (move_by_pieces_ninsns (SIZE, ALIGN) < MOVE_RATIO)
  #endif
  
*************** convert_modes (mode, oldmode, x, unsigne
*** 1366,1370 ****
  /* MOVE_MAX_PIECES is the number of bytes at a time which we can
     move efficiently, as opposed to  MOVE_MAX which is the maximum
!    number of bhytes we can move with a single instruction. */
  
  #ifndef MOVE_MAX_PIECES
--- 1366,1370 ----
  /* MOVE_MAX_PIECES is the number of bytes at a time which we can
     move efficiently, as opposed to  MOVE_MAX which is the maximum
!    number of bytes we can move with a single instruction. */
  
  #ifndef MOVE_MAX_PIECES
*************** convert_modes (mode, oldmode, x, unsigne
*** 1376,1380 ****
     The caller must pass FROM and TO
      through protect_from_queue before calling.
!    ALIGN (in bytes) is maximum alignment we can assume.  */
  
  void
--- 1376,1380 ----
     The caller must pass FROM and TO
      through protect_from_queue before calling.
!    ALIGN is maximum alignment we can assume.  */
  
  void
*************** move_by_pieces (to, from, len, align)
*** 1458,1463 ****
  
    if (! SLOW_UNALIGNED_ACCESS (word_mode, align)
!       || align > MOVE_MAX || align >= BIGGEST_ALIGNMENT / BITS_PER_UNIT)
!     align = MOVE_MAX;
  
    /* First move what we can in the largest integer mode, then go to
--- 1458,1463 ----
  
    if (! SLOW_UNALIGNED_ACCESS (word_mode, align)
!       || align > MOVE_MAX * BITS_PER_UNIT || align >= BIGGEST_ALIGNMENT)
!     align = MOVE_MAX * BITS_PER_UNIT;
  
    /* First move what we can in the largest integer mode, then go to
*************** move_by_pieces (to, from, len, align)
*** 1475,1481 ****
  
        icode = mov_optab->handlers[(int) mode].insn_code;
!       if (icode != CODE_FOR_nothing
! 	  && align >= MIN (BIGGEST_ALIGNMENT / BITS_PER_UNIT,
! 			   (unsigned int) GET_MODE_SIZE (mode)))
  	move_by_pieces_1 (GEN_FCN (icode), mode, &data);
  
--- 1475,1479 ----
  
        icode = mov_optab->handlers[(int) mode].insn_code;
!       if (icode != CODE_FOR_nothing && align >= GET_MODE_ALIGNMENT (mode))
  	move_by_pieces_1 (GEN_FCN (icode), mode, &data);
  
*************** move_by_pieces_ninsns (l, align)
*** 1500,1504 ****
  
    if (! SLOW_UNALIGNED_ACCESS (word_mode, align)
!       || align > MOVE_MAX || align >= BIGGEST_ALIGNMENT / BITS_PER_UNIT)
      align = MOVE_MAX;
  
--- 1498,1502 ----
  
    if (! SLOW_UNALIGNED_ACCESS (word_mode, align)
!       || align > MOVE_MAX * BITS_PER_UNIT || align >= BIGGEST_ALIGNMENT)
      align = MOVE_MAX;
  
*************** move_by_pieces_ninsns (l, align)
*** 1517,1522 ****
  
        icode = mov_optab->handlers[(int) mode].insn_code;
!       if (icode != CODE_FOR_nothing
! 	  && align >= GET_MODE_ALIGNMENT (mode) / BITS_PER_UNIT)
  	n_insns += l / GET_MODE_SIZE (mode), l %= GET_MODE_SIZE (mode);
  
--- 1515,1519 ----
  
        icode = mov_optab->handlers[(int) mode].insn_code;
!       if (icode != CODE_FOR_nothing && align >= GET_MODE_ALIGNMENT (mode))
  	n_insns += l / GET_MODE_SIZE (mode), l %= GET_MODE_SIZE (mode);
  
*************** move_by_pieces_1 (genfun, mode, data)
*** 1585,1590 ****
     with mode BLKmode.
     SIZE is an rtx that says how long they are.
!    ALIGN is the maximum alignment we can assume they have,
!    measured in bytes. 
  
     Return the address of the new block, if memcpy is called and returns it,
--- 1582,1586 ----
     with mode BLKmode.
     SIZE is an rtx that says how long they are.
!    ALIGN is the maximum alignment we can assume they have.
  
     Return the address of the new block, if memcpy is called and returns it,
*************** emit_block_move (x, y, size, align)
*** 1628,1632 ****
  	 the more limited one has some advantage.  */
  
!       rtx opalign = GEN_INT (align);
        enum machine_mode mode;
  
--- 1624,1628 ----
  	 the more limited one has some advantage.  */
  
!       rtx opalign = GEN_INT (align / BITS_PER_UNIT);
        enum machine_mode mode;
  
*************** emit_group_load (dst, orig_src, ssize, a
*** 1953,1957 ****
        /* Optimize the access just a bit.  */
        if (GET_CODE (src) == MEM
! 	  && align * BITS_PER_UNIT >= GET_MODE_ALIGNMENT (mode)
  	  && bytepos * BITS_PER_UNIT % GET_MODE_ALIGNMENT (mode) == 0
  	  && bytelen == GET_MODE_SIZE (mode))
--- 1949,1953 ----
        /* Optimize the access just a bit.  */
        if (GET_CODE (src) == MEM
! 	  && align >= GET_MODE_ALIGNMENT (mode)
  	  && bytepos * BITS_PER_UNIT % GET_MODE_ALIGNMENT (mode) == 0
  	  && bytelen == GET_MODE_SIZE (mode))
*************** emit_group_load (dst, orig_src, ssize, a
*** 1975,1990 ****
  	}
        else
! 	{
! 	  tmps[i] = extract_bit_field (src, bytelen*BITS_PER_UNIT,
! 				       bytepos*BITS_PER_UNIT, 1, NULL_RTX,
! 				       mode, mode, align, ssize);
! 	}
  
        if (BYTES_BIG_ENDIAN && shift)
! 	{
! 	  expand_binop (mode, ashl_optab, tmps[i], GEN_INT (shift),
! 			tmps[i], 0, OPTAB_WIDEN);
! 	}
      }
    emit_queue();
  
--- 1971,1983 ----
  	}
        else
! 	tmps[i] = extract_bit_field (src, bytelen * BITS_PER_UNIT,
! 				     bytepos * BITS_PER_UNIT, 1, NULL_RTX,
! 				     mode, mode, align, ssize);
  
        if (BYTES_BIG_ENDIAN && shift)
! 	expand_binop (mode, ashl_optab, tmps[i], GEN_INT (shift),
! 		      tmps[i], 0, OPTAB_WIDEN);
      }
+ 
    emit_queue();
  
*************** emit_group_store (orig_dst, src, ssize, 
*** 2086,2090 ****
        /* Optimize the access just a bit.  */
        if (GET_CODE (dst) == MEM
! 	  && align * BITS_PER_UNIT >= GET_MODE_ALIGNMENT (mode)
  	  && bytepos * BITS_PER_UNIT % GET_MODE_ALIGNMENT (mode) == 0
  	  && bytelen == GET_MODE_SIZE (mode))
--- 2079,2083 ----
        /* Optimize the access just a bit.  */
        if (GET_CODE (dst) == MEM
! 	  && align >= GET_MODE_ALIGNMENT (mode)
  	  && bytepos * BITS_PER_UNIT % GET_MODE_ALIGNMENT (mode) == 0
  	  && bytelen == GET_MODE_SIZE (mode))
*************** emit_group_store (orig_dst, src, ssize, 
*** 2115,2186 ****
  
  rtx
! copy_blkmode_from_reg (tgtblk,srcreg,type)
       rtx tgtblk;
       rtx srcreg;
       tree type;
  {
!       int bytes = int_size_in_bytes (type);
!       rtx src = NULL, dst = NULL;
!       int bitsize = MIN (TYPE_ALIGN (type), BITS_PER_WORD);
!       int bitpos, xbitpos, big_endian_correction = 0;
!       
!       if (tgtblk == 0)
! 	{
! 	  tgtblk = assign_stack_temp (BLKmode, bytes, 0);
! 	  MEM_SET_IN_STRUCT_P (tgtblk, AGGREGATE_TYPE_P (type));
! 	  preserve_temp_slots (tgtblk);
! 	}
        
!       /* This code assumes srcreg is at least a full word.  If it isn't,
! 	 copy it into a new pseudo which is a full word.  */
!       if (GET_MODE (srcreg) != BLKmode
! 	  && GET_MODE_SIZE (GET_MODE (srcreg)) < UNITS_PER_WORD)
! 	srcreg = convert_to_mode (word_mode, srcreg,
! 				  TREE_UNSIGNED (type));
! 
!       /* Structures whose size is not a multiple of a word are aligned
! 	 to the least significant byte (to the right).  On a BYTES_BIG_ENDIAN
! 	 machine, this means we must skip the empty high order bytes when
! 	 calculating the bit offset.  */
!       if (BYTES_BIG_ENDIAN && bytes % UNITS_PER_WORD)
! 	big_endian_correction = (BITS_PER_WORD - ((bytes % UNITS_PER_WORD)
! 						  * BITS_PER_UNIT));
! 
!       /* Copy the structure BITSIZE bites at a time.
! 
! 	 We could probably emit more efficient code for machines
! 	 which do not use strict alignment, but it doesn't seem
! 	 worth the effort at the current time.  */
!       for (bitpos = 0, xbitpos = big_endian_correction;
! 	   bitpos < bytes * BITS_PER_UNIT;
! 	   bitpos += bitsize, xbitpos += bitsize)
! 	{
! 
! 	  /* We need a new source operand each time xbitpos is on a 
! 	     word boundary and when xbitpos == big_endian_correction
! 	     (the first time through).  */
! 	  if (xbitpos % BITS_PER_WORD == 0
! 	      || xbitpos == big_endian_correction)
! 	    src = operand_subword_force (srcreg,
! 					 xbitpos / BITS_PER_WORD, 
! 					 BLKmode);
! 
! 	  /* We need a new destination operand each time bitpos is on
! 	     a word boundary.  */
! 	  if (bitpos % BITS_PER_WORD == 0)
! 	    dst = operand_subword (tgtblk, bitpos / BITS_PER_WORD, 1, BLKmode);
  	      
! 	  /* Use xbitpos for the source extraction (right justified) and
! 	     xbitpos for the destination store (left justified).  */
! 	  store_bit_field (dst, bitsize, bitpos % BITS_PER_WORD, word_mode,
! 			   extract_bit_field (src, bitsize,
! 					      xbitpos % BITS_PER_WORD, 1,
! 					      NULL_RTX, word_mode,
! 					      word_mode,
! 					      bitsize / BITS_PER_UNIT,
! 					      BITS_PER_WORD),
! 			   bitsize / BITS_PER_UNIT, BITS_PER_WORD);
! 	}
!       return tgtblk;
  }
  
--- 2108,2174 ----
  
  rtx
! copy_blkmode_from_reg (tgtblk, srcreg, type)
       rtx tgtblk;
       rtx srcreg;
       tree type;
  {
!   unsigned HOST_WIDE_INT bytes = int_size_in_bytes (type);
!   rtx src = NULL, dst = NULL;
!   unsigned HOST_WIDE_INT bitsize = MIN (TYPE_ALIGN (type), BITS_PER_WORD);
!   unsigned HOST_WIDE_INT bitpos, xbitpos, big_endian_correction = 0;
! 
!   if (tgtblk == 0)
!     {
!       tgtblk = assign_stack_temp (BLKmode, bytes, 0);
!       MEM_SET_IN_STRUCT_P (tgtblk, AGGREGATE_TYPE_P (type));
!       preserve_temp_slots (tgtblk);
!     }
        
!   /* This code assumes srcreg is at least a full word.  If it isn't,
!      copy it into a new pseudo which is a full word.  */
!   if (GET_MODE (srcreg) != BLKmode
!       && GET_MODE_SIZE (GET_MODE (srcreg)) < UNITS_PER_WORD)
!     srcreg = convert_to_mode (word_mode, srcreg, TREE_UNSIGNED (type));
! 
!   /* Structures whose size is not a multiple of a word are aligned
!      to the least significant byte (to the right).  On a BYTES_BIG_ENDIAN
!      machine, this means we must skip the empty high order bytes when
!      calculating the bit offset.  */
!   if (BYTES_BIG_ENDIAN && bytes % UNITS_PER_WORD)
!     big_endian_correction
!       = (BITS_PER_WORD - ((bytes % UNITS_PER_WORD) * BITS_PER_UNIT));
! 
!   /* Copy the structure BITSIZE bites at a time.
!      
!      We could probably emit more efficient code for machines which do not use
!      strict alignment, but it doesn't seem worth the effort at the current
!      time.  */
!   for (bitpos = 0, xbitpos = big_endian_correction;
!        bitpos < bytes * BITS_PER_UNIT;
!        bitpos += bitsize, xbitpos += bitsize)
!     {
!       /* We need a new source operand each time xbitpos is on a 
! 	 word boundary and when xbitpos == big_endian_correction
! 	 (the first time through).  */
!       if (xbitpos % BITS_PER_WORD == 0
! 	  || xbitpos == big_endian_correction)
! 	src = operand_subword_force (srcreg, xbitpos / BITS_PER_WORD, BLKmode);
! 
!       /* We need a new destination operand each time bitpos is on
! 	 a word boundary.  */
!       if (bitpos % BITS_PER_WORD == 0)
! 	dst = operand_subword (tgtblk, bitpos / BITS_PER_WORD, 1, BLKmode);
  	      
!       /* Use xbitpos for the source extraction (right justified) and
! 	 xbitpos for the destination store (left justified).  */
!       store_bit_field (dst, bitsize, bitpos % BITS_PER_WORD, word_mode,
! 		       extract_bit_field (src, bitsize,
! 					  xbitpos % BITS_PER_WORD, 1,
! 					  NULL_RTX, word_mode, word_mode,
! 					  bitsize, BITS_PER_WORD),
! 		       bitsize, BITS_PER_WORD);
!     }
! 
!   return tgtblk;
  }
  
*************** use_group_regs (call_fusage, regs)
*** 2243,2250 ****
  }
  
! /* Generate several move instructions to clear LEN bytes of block TO.
!    (A MEM rtx with BLKmode).   The caller must pass TO through
!    protect_from_queue before calling. ALIGN (in bytes) is maximum alignment
!    we can assume.  */
  
  static void
--- 2231,2237 ----
  }
  
! /* Generate several move instructions to clear LEN bytes of block TO.  (A MEM
!    rtx with BLKmode).  The caller must pass TO through protect_from_queue
!    before calling. ALIGN is maximum alignment we can assume.  */
  
  static void
*************** clear_by_pieces (to, len, align)
*** 2304,2308 ****
  
    if (! SLOW_UNALIGNED_ACCESS (word_mode, align)
!       || align > MOVE_MAX || align >= BIGGEST_ALIGNMENT / BITS_PER_UNIT)
      align = MOVE_MAX;
  
--- 2291,2295 ----
  
    if (! SLOW_UNALIGNED_ACCESS (word_mode, align)
!       || align > MOVE_MAX * BITS_PER_UNIT || align >= BIGGEST_ALIGNMENT)
      align = MOVE_MAX;
  
*************** clear_by_pieces (to, len, align)
*** 2321,2326 ****
  
        icode = mov_optab->handlers[(int) mode].insn_code;
!       if (icode != CODE_FOR_nothing
! 	  && align >= GET_MODE_ALIGNMENT (mode) / BITS_PER_UNIT)
  	clear_by_pieces_1 (GEN_FCN (icode), mode, &data);
  
--- 2308,2312 ----
  
        icode = mov_optab->handlers[(int) mode].insn_code;
!       if (icode != CODE_FOR_nothing && align >= GET_MODE_ALIGNMENT (mode))
  	clear_by_pieces_1 (GEN_FCN (icode), mode, &data);
  
*************** clear_by_pieces_1 (genfun, mode, data)
*** 2370,2376 ****
  }
  
! /* Write zeros through the storage of OBJECT.
!    If OBJECT has BLKmode, SIZE is its length in bytes and ALIGN is
!    the maximum alignment we can is has, measured in bytes.
  
     If we call a function that returns the length of the block, return it.  */
--- 2356,2361 ----
  }
  
! /* Write zeros through the storage of OBJECT.  If OBJECT has BLKmode, SIZE is
!    its length in bytes and ALIGN is the maximum alignment we can is has.
  
     If we call a function that returns the length of the block, return it.  */
*************** clear_storage (object, size, align)
*** 2396,2400 ****
  	  && MOVE_BY_PIECES_P (INTVAL (size), align))
  	clear_by_pieces (object, INTVAL (size), align);
- 
        else
  	{
--- 2381,2384 ----
*************** clear_storage (object, size, align)
*** 2403,2407 ****
  	     the more limited one has some advantage.  */
  
! 	  rtx opalign = GEN_INT (align);
  	  enum machine_mode mode;
  
--- 2387,2391 ----
  	     the more limited one has some advantage.  */
  
! 	  rtx opalign = GEN_INT (align / BITS_PER_UNIT);
  	  enum machine_mode mode;
  
*************** get_push_address (size)
*** 2900,2904 ****
     needed only if X is BLKmode.
  
!    ALIGN (in bytes) is maximum alignment we can assume.
  
     If PARTIAL and REG are both nonzero, then copy that many of the first
--- 2884,2888 ----
     needed only if X is BLKmode.
  
!    ALIGN is maximum alignment we can assume.
  
     If PARTIAL and REG are both nonzero, then copy that many of the first
*************** emit_push_insn (x, mode, type, size, ali
*** 3002,3006 ****
  	     and such small pushes do rounding that causes trouble.  */
  	  && ((! SLOW_UNALIGNED_ACCESS (word_mode, align))
! 	      || align >= BIGGEST_ALIGNMENT / BITS_PER_UNIT
  	      || PUSH_ROUNDING (align) == align)
  	  && PUSH_ROUNDING (INTVAL (size)) == INTVAL (size))
--- 2986,2990 ----
  	     and such small pushes do rounding that causes trouble.  */
  	  && ((! SLOW_UNALIGNED_ACCESS (word_mode, align))
! 	      || align >= BIGGEST_ALIGNMENT
  	      || PUSH_ROUNDING (align) == align)
  	  && PUSH_ROUNDING (INTVAL (size)) == INTVAL (size))
*************** emit_push_insn (x, mode, type, size, ali
*** 3103,3107 ****
  	  else
  	    {
! 	      rtx opalign = GEN_INT (align);
  	      enum machine_mode mode;
  	      rtx target = gen_rtx_MEM (BLKmode, temp);
--- 3087,3091 ----
  	  else
  	    {
! 	      rtx opalign = GEN_INT (align / BITS_PER_UNIT);
  	      enum machine_mode mode;
  	      rtx target = gen_rtx_MEM (BLKmode, temp);
*************** expand_assignment (to, from, want_value,
*** 3394,3398 ****
  	      && (bitpos % bitsize) == 0 
  	      && (bitsize % GET_MODE_ALIGNMENT (mode1)) == 0
! 	      && (alignment * BITS_PER_UNIT) == GET_MODE_ALIGNMENT (mode1))
  	    {
  	      rtx temp = change_address (to_rtx, mode1,
--- 3378,3382 ----
  	      && (bitpos % bitsize) == 0 
  	      && (bitsize % GET_MODE_ALIGNMENT (mode1)) == 0
! 	      && alignment == GET_MODE_ALIGNMENT (mode1))
  	    {
  	      rtx temp = change_address (to_rtx, mode1,
*************** expand_assignment (to, from, want_value,
*** 3484,3488 ****
  
  	  emit_block_move (inner_to_rtx, from_rtx, expr_size (from),
! 			   MIN (alignment, from_align / BITS_PER_UNIT));
  	  free_temp_slots ();
  	  pop_temp_slots ();
--- 3468,3472 ----
  
  	  emit_block_move (inner_to_rtx, from_rtx, expr_size (from),
! 			   MIN (alignment, from_align));
  	  free_temp_slots ();
  	  pop_temp_slots ();
*************** expand_assignment (to, from, want_value,
*** 3498,3502 ****
  				 : VOIDmode),
  				unsignedp,
- 				/* Required alignment of containing datum.  */
  				alignment,
  				int_size_in_bytes (TREE_TYPE (tem)),
--- 3482,3485 ----
*************** expand_assignment (to, from, want_value,
*** 3543,3550 ****
        if (GET_CODE (to_rtx) == PARALLEL)
  	emit_group_load (to_rtx, value, int_size_in_bytes (TREE_TYPE (from)),
! 			 TYPE_ALIGN (TREE_TYPE (from)) / BITS_PER_UNIT);
        else if (GET_MODE (to_rtx) == BLKmode)
  	emit_block_move (to_rtx, value, expr_size (from),
! 			 TYPE_ALIGN (TREE_TYPE (from)) / BITS_PER_UNIT);
        else
  	{
--- 3526,3533 ----
        if (GET_CODE (to_rtx) == PARALLEL)
  	emit_group_load (to_rtx, value, int_size_in_bytes (TREE_TYPE (from)),
! 			 TYPE_ALIGN (TREE_TYPE (from)));
        else if (GET_MODE (to_rtx) == BLKmode)
  	emit_block_move (to_rtx, value, expr_size (from),
! 			 TYPE_ALIGN (TREE_TYPE (from)));
        else
  	{
*************** expand_assignment (to, from, want_value,
*** 3583,3587 ****
        if (GET_CODE (to_rtx) == PARALLEL)
  	emit_group_load (to_rtx, temp, int_size_in_bytes (TREE_TYPE (from)),
! 			 TYPE_ALIGN (TREE_TYPE (from)) / BITS_PER_UNIT);
        else
  	emit_move_insn (to_rtx, temp);
--- 3566,3570 ----
        if (GET_CODE (to_rtx) == PARALLEL)
  	emit_group_load (to_rtx, temp, int_size_in_bytes (TREE_TYPE (from)),
! 			 TYPE_ALIGN (TREE_TYPE (from)));
        else
  	emit_move_insn (to_rtx, temp);
*************** store_expr (exp, target, want_value)
*** 3909,3914 ****
  	  if (GET_CODE (size) == CONST_INT
  	      && INTVAL (size) < TREE_STRING_LENGTH (exp))
! 	    emit_block_move (target, temp, size,
! 			     TYPE_ALIGN (TREE_TYPE (exp)) / BITS_PER_UNIT);
  	  else
  	    {
--- 3892,3896 ----
  	  if (GET_CODE (size) == CONST_INT
  	      && INTVAL (size) < TREE_STRING_LENGTH (exp))
! 	    emit_block_move (target, temp, size, TYPE_ALIGN (TREE_TYPE (exp)));
  	  else
  	    {
*************** store_expr (exp, target, want_value)
*** 3924,3928 ****
  	      /* Copy that much.  */
  	      emit_block_move (target, temp, copy_size_rtx,
! 			       TYPE_ALIGN (TREE_TYPE (exp)) / BITS_PER_UNIT);
  
  	      /* Figure out how much is left in TARGET that we have to clear.
--- 3906,3910 ----
  	      /* Copy that much.  */
  	      emit_block_move (target, temp, copy_size_rtx,
! 			       TYPE_ALIGN (TREE_TYPE (exp)));
  
  	      /* Figure out how much is left in TARGET that we have to clear.
*************** store_expr (exp, target, want_value)
*** 3988,3995 ****
        else if (GET_CODE (target) == PARALLEL)
  	emit_group_load (target, temp, int_size_in_bytes (TREE_TYPE (exp)),
! 			 TYPE_ALIGN (TREE_TYPE (exp)) / BITS_PER_UNIT);
        else if (GET_MODE (temp) == BLKmode)
  	emit_block_move (target, temp, expr_size (exp),
! 			 TYPE_ALIGN (TREE_TYPE (exp)) / BITS_PER_UNIT);
        else
  	emit_move_insn (target, temp);
--- 3970,3977 ----
        else if (GET_CODE (target) == PARALLEL)
  	emit_group_load (target, temp, int_size_in_bytes (TREE_TYPE (exp)),
! 			 TYPE_ALIGN (TREE_TYPE (exp)));
        else if (GET_MODE (temp) == BLKmode)
  	emit_block_move (target, temp, expr_size (exp),
! 			 TYPE_ALIGN (TREE_TYPE (exp)));
        else
  	emit_move_insn (target, temp);
*************** store_constructor_field (target, bitsize
*** 4127,4132 ****
      }
    else
!     store_field (target, bitsize, bitpos, mode, exp, VOIDmode, 0, 
! 		 (align + BITS_PER_UNIT - 1) / BITS_PER_UNIT,
  		 int_size_in_bytes (type), 0);
  }
--- 4109,4113 ----
      }
    else
!     store_field (target, bitsize, bitpos, mode, exp, VOIDmode, 0, align,
  		 int_size_in_bytes (type), 0);
  }
*************** store_constructor_field (target, bitsize
*** 4134,4138 ****
  /* Store the value of constructor EXP into the rtx TARGET.
     TARGET is either a REG or a MEM.
!    ALIGN is the maximum known alignment for TARGET, in bits.
     CLEARED is true if TARGET is known to have been zero'd.
     SIZE is the number of bytes of TARGET we are allowed to modify: this
--- 4115,4119 ----
  /* Store the value of constructor EXP into the rtx TARGET.
     TARGET is either a REG or a MEM.
!    ALIGN is the maximum known alignment for TARGET.
     CLEARED is true if TARGET is known to have been zero'd.
     SIZE is the number of bytes of TARGET we are allowed to modify: this
*************** store_constructor (exp, target, align, c
*** 4181,4186 ****
  	  /* If the constructor is empty, clear the union.  */
  	  if (! CONSTRUCTOR_ELTS (exp)  && ! cleared)
! 	    clear_storage (target, expr_size (exp),
! 			   TYPE_ALIGN (type) / BITS_PER_UNIT);
  	}
  
--- 4162,4166 ----
  	  /* If the constructor is empty, clear the union.  */
  	  if (! CONSTRUCTOR_ELTS (exp)  && ! cleared)
! 	    clear_storage (target, expr_size (exp), TYPE_ALIGN (type));
  	}
  
*************** store_constructor (exp, target, align, c
*** 4207,4212 ****
  	{
  	  if (! cleared)
! 	    clear_storage (target, GEN_INT (size),
! 			   (align + BITS_PER_UNIT - 1) / BITS_PER_UNIT);
  
  	  cleared = 1;
--- 4187,4191 ----
  	{
  	  if (! cleared)
! 	    clear_storage (target, GEN_INT (size), align);
  
  	  cleared = 1;
*************** store_constructor (exp, target, align, c
*** 4362,4365 ****
--- 4341,4345 ----
  	      tree index = TREE_PURPOSE (elt);
  	      HOST_WIDE_INT this_node_count;
+ 
  	      if (index != NULL_TREE && TREE_CODE (index) == RANGE_EXPR)
  		{
*************** store_constructor (exp, target, align, c
*** 4367,4378 ****
  		  tree hi_index = TREE_OPERAND (index, 1);
  
! 		  if (TREE_CODE (lo_index) != INTEGER_CST
! 		      || TREE_CODE (hi_index) != INTEGER_CST)
  		    {
  		      need_to_clear = 1;
  		      break;
  		    }
! 		  this_node_count = (TREE_INT_CST_LOW (hi_index)
! 				     - TREE_INT_CST_LOW (lo_index) + 1);
  		}
  	      else
--- 4347,4359 ----
  		  tree hi_index = TREE_OPERAND (index, 1);
  
! 		  if (! host_integerp (lo_index, 1)
! 		      || ! host_integerp (hi_index, 1))
  		    {
  		      need_to_clear = 1;
  		      break;
  		    }
! 
! 		  this_node_count = (tree_low_cst (hi_index, 1)
! 				     - tree_low_cst (lo_index, 1) + 1);
  		}
  	      else
*************** store_constructor (exp, target, align, c
*** 4391,4396 ****
  	{
  	  if (! cleared)
! 	    clear_storage (target, GEN_INT (size),
! 			   (align + BITS_PER_UNIT - 1) / BITS_PER_UNIT);
  	  cleared = 1;
  	}
--- 4372,4376 ----
  	{
  	  if (! cleared)
! 	    clear_storage (target, GEN_INT (size), align);
  	  cleared = 1;
  	}
*************** store_constructor (exp, target, align, c
*** 4407,4412 ****
  	{
  	  register enum machine_mode mode;
! 	  int bitsize;
! 	  int bitpos;
  	  int unsignedp;
  	  tree value = TREE_VALUE (elt);
--- 4387,4392 ----
  	{
  	  register enum machine_mode mode;
! 	  HOST_WIDE_INT bitsize;
! 	  HOST_WIDE_INT bitpos;
  	  int unsignedp;
  	  tree value = TREE_VALUE (elt);
*************** store_constructor (exp, target, align, c
*** 4421,4431 ****
  	  mode = TYPE_MODE (elttype);
  	  if (mode == BLKmode)
! 	    {
! 	      if (TREE_CODE (TYPE_SIZE (elttype)) == INTEGER_CST
! 		  && TREE_INT_CST_HIGH (TYPE_SIZE (elttype)) == 0)
! 		bitsize = TREE_INT_CST_LOW (TYPE_SIZE (elttype));
! 	      else
! 		bitsize = -1;
! 	    }
  	  else
  	    bitsize = GET_MODE_BITSIZE (mode);
--- 4401,4407 ----
  	  mode = TYPE_MODE (elttype);
  	  if (mode == BLKmode)
! 	    bitsize = (host_integerp (TYPE_SIZE (elttype), 1)
! 		       ? tree_low_cst (TYPE_SIZE (elttype), 1)
! 		       : -1);
  	  else
  	    bitsize = GET_MODE_BITSIZE (mode);
*************** store_constructor (exp, target, align, c
*** 4441,4459 ****
  
  	      /* If the range is constant and "small", unroll the loop.  */
! 	      if (TREE_CODE (lo_index) == INTEGER_CST
! 		  && TREE_CODE (hi_index) == INTEGER_CST
! 		  && (lo = TREE_INT_CST_LOW (lo_index),
! 		      hi = TREE_INT_CST_LOW (hi_index),
  		      count = hi - lo + 1,
  		      (GET_CODE (target) != MEM
  		       || count <= 2
! 		       || (TREE_CODE (TYPE_SIZE (elttype)) == INTEGER_CST
! 			   && TREE_INT_CST_LOW (TYPE_SIZE (elttype)) * count
! 			   <= 40 * 8))))
  		{
  		  lo -= minelt;  hi -= minelt;
  		  for (; lo <= hi; lo++)
  		    {
! 		      bitpos = lo * TREE_INT_CST_LOW (TYPE_SIZE (elttype));
  		      store_constructor_field (target, bitsize, bitpos, mode,
  					       value, type, align, cleared);
--- 4417,4435 ----
  
  	      /* If the range is constant and "small", unroll the loop.  */
! 	      if (host_integerp (lo_index, 0)
! 		  && host_integerp (hi_index, 0)
! 		  && (lo = tree_low_cst (lo_index, 0),
! 		      hi = tree_low_cst (hi_index, 0),
  		      count = hi - lo + 1,
  		      (GET_CODE (target) != MEM
  		       || count <= 2
! 		       || (host_integerp (TYPE_SIZE (elttype), 1)
! 			   && (tree_low_cst (TYPE_SIZE (elttype), 1) * count
! 			       <= 40 * 8)))))
  		{
  		  lo -= minelt;  hi -= minelt;
  		  for (; lo <= hi; lo++)
  		    {
! 		      bitpos = lo * tree_low_cst (TYPE_SIZE (elttype), 0);
  		      store_constructor_field (target, bitsize, bitpos, mode,
  					       value, type, align, cleared);
*************** store_constructor (exp, target, align, c
*** 4514,4519 ****
  		}
  	    }
! 	  else if ((index != 0 && TREE_CODE (index) != INTEGER_CST)
! 	      || TREE_CODE (TYPE_SIZE (elttype)) != INTEGER_CST)
  	    {
  	      rtx pos_rtx, addr;
--- 4490,4495 ----
  		}
  	    }
! 	  else if ((index != 0 && ! host_integerp (index, 0))
! 		   || ! host_integerp (TYPE_SIZE (elttype), 1))
  	    {
  	      rtx pos_rtx, addr;
*************** store_constructor (exp, target, align, c
*** 4527,4530 ****
--- 4503,4507 ----
  				 fold (build (MINUS_EXPR, index,
  					      TYPE_MIN_VALUE (domain))));
+ 
  	      position = size_binop (MULT_EXPR, index,
  				     convert (ssizetype,
*************** store_constructor (exp, target, align, c
*** 4538,4545 ****
  	    {
  	      if (index != 0)
! 		bitpos = ((TREE_INT_CST_LOW (index) - minelt)
! 			  * TREE_INT_CST_LOW (TYPE_SIZE (elttype)));
  	      else
! 		bitpos = (i * TREE_INT_CST_LOW (TYPE_SIZE (elttype)));
  	      store_constructor_field (target, bitsize, bitpos, mode, value,
  				       type, align, cleared);
--- 4515,4523 ----
  	    {
  	      if (index != 0)
! 		bitpos = ((tree_low_cst (index, 0) - minelt)
! 			  * tree_low_cst (TYPE_SIZE (elttype), 1));
  	      else
! 		bitpos = (i * tree_low_cst (TYPE_SIZE (elttype), 1));
! 
  	      store_constructor_field (target, bitsize, bitpos, mode, value,
  				       type, align, cleared);
*************** store_constructor (exp, target, align, c
*** 4547,4555 ****
  	}
      }
!   /* set constructor assignments */
    else if (TREE_CODE (type) == SET_TYPE)
      {
        tree elt = CONSTRUCTOR_ELTS (exp);
!       int nbytes = int_size_in_bytes (type), nbits;
        tree domain = TYPE_DOMAIN (type);
        tree domain_min, domain_max, bitlength;
--- 4525,4534 ----
  	}
      }
! 
!   /* Set constructor assignments */
    else if (TREE_CODE (type) == SET_TYPE)
      {
        tree elt = CONSTRUCTOR_ELTS (exp);
!       unsigned HOST_WIDE_INT nbytes = int_size_in_bytes (type), nbits;
        tree domain = TYPE_DOMAIN (type);
        tree domain_min, domain_max, bitlength;
*************** store_constructor (exp, target, align, c
*** 4569,4574 ****
  	{
  	  if (!cleared)
! 	    clear_storage (target, GEN_INT (size),
! 			   TYPE_ALIGN (type) / BITS_PER_UNIT);
  	  return;
  	}
--- 4548,4552 ----
  	{
  	  if (!cleared)
! 	    clear_storage (target, GEN_INT (size), TYPE_ALIGN (type));
  	  return;
  	}
*************** store_constructor (exp, target, align, c
*** 4580,4586 ****
  			      ssize_int (1));
  
!       if (nbytes < 0 || TREE_CODE (bitlength) != INTEGER_CST)
! 	abort ();
!       nbits = TREE_INT_CST_LOW (bitlength);
  
        /* For "small" sets, or "medium-sized" (up to 32 bytes) sets that
--- 4558,4562 ----
  			      ssize_int (1));
  
!       nbits = tree_low_cst (bitlength, 1);
  
        /* For "small" sets, or "medium-sized" (up to 32 bytes) sets that
*************** store_constructor (exp, target, align, c
*** 4590,4600 ****
  	  || (nbytes <= 32 && TREE_CHAIN (elt) != NULL_TREE))
  	{
! 	  int set_word_size = TYPE_ALIGN (TREE_TYPE (exp));
  	  enum machine_mode mode = mode_for_size (set_word_size, MODE_INT, 1);
  	  char *bit_buffer = (char *) alloca (nbits);
  	  HOST_WIDE_INT word = 0;
! 	  int bit_pos = 0;
! 	  int ibit = 0;
! 	  int offset = 0;  /* In bytes from beginning of set.  */
  	  elt = get_set_constructor_bits (exp, bit_buffer, nbits);
  	  for (;;)
--- 4566,4577 ----
  	  || (nbytes <= 32 && TREE_CHAIN (elt) != NULL_TREE))
  	{
! 	  unsigned int set_word_size = TYPE_ALIGN (TREE_TYPE (exp));
  	  enum machine_mode mode = mode_for_size (set_word_size, MODE_INT, 1);
  	  char *bit_buffer = (char *) alloca (nbits);
  	  HOST_WIDE_INT word = 0;
! 	  unsigned int bit_pos = 0;
! 	  unsigned int ibit = 0;
! 	  unsigned int offset = 0;  /* In bytes from beginning of set.  */
! 
  	  elt = get_set_constructor_bits (exp, bit_buffer, nbits);
  	  for (;;)
*************** store_constructor (exp, target, align, c
*** 4607,4610 ****
--- 4584,4588 ----
  		    word |= 1 << bit_pos;
  		}
+ 
  	      bit_pos++;  ibit++;
  	      if (bit_pos >= set_word_size || ibit == nbits)
*************** store_constructor (exp, target, align, c
*** 4614,4617 ****
--- 4592,4596 ----
  		      rtx datum = GEN_INT (word);
  		      rtx to_rtx;
+ 
  		      /* The assumption here is that it is safe to use
  			 XEXP if the set is multi-word, but not if
*************** store_constructor (exp, target, align, c
*** 4628,4631 ****
--- 4607,4611 ----
  		      emit_move_insn (to_rtx, datum);
  		    }
+ 
  		  if (ibit == nbits)
  		    break;
*************** store_constructor (exp, target, align, c
*** 4637,4653 ****
  	}
        else if (!cleared)
! 	{
! 	  /* Don't bother clearing storage if the set is all ones.  */
! 	  if (TREE_CHAIN (elt) != NULL_TREE
! 	      || (TREE_PURPOSE (elt) == NULL_TREE
! 		  ? nbits != 1
! 		  : (TREE_CODE (TREE_VALUE (elt)) != INTEGER_CST
! 		     || TREE_CODE (TREE_PURPOSE (elt)) != INTEGER_CST
! 		     || ((HOST_WIDE_INT) TREE_INT_CST_LOW (TREE_VALUE (elt))
! 			 - (HOST_WIDE_INT) TREE_INT_CST_LOW (TREE_PURPOSE (elt)) + 1
! 			 != nbits))))
! 	    clear_storage (target, expr_size (exp),
! 			   TYPE_ALIGN (type) / BITS_PER_UNIT);
! 	}
  	  
        for (; elt != NULL_TREE; elt = TREE_CHAIN (elt))
--- 4617,4630 ----
  	}
        else if (!cleared)
! 	/* Don't bother clearing storage if the set is all ones.  */
! 	if (TREE_CHAIN (elt) != NULL_TREE
! 	    || (TREE_PURPOSE (elt) == NULL_TREE
! 		? nbits != 1
! 		: ( ! host_integerp (TREE_VALUE (elt), 0)
! 		   || ! host_integerp (TREE_PURPOSE (elt), 0)
! 		   || (tree_low_cst (TREE_VALUE (elt), 0)
! 		       - tree_low_cst (TREE_PURPOSE (elt), 0) + 1
! 		       != (HOST_WIDE_INT) nbits))))
! 	  clear_storage (target, expr_size (exp), TYPE_ALIGN (type));
  	  
        for (; elt != NULL_TREE; elt = TREE_CHAIN (elt))
*************** store_constructor (exp, target, align, c
*** 4660,4667 ****
  	  HOST_WIDE_INT startb, endb;
  #endif
! 	  rtx  bitlength_rtx, startbit_rtx, endbit_rtx, targetx;
  
  	  bitlength_rtx = expand_expr (bitlength,
! 			    NULL_RTX, MEM, EXPAND_CONST_ADDRESS);
  
  	  /* handle non-range tuple element like [ expr ]  */
--- 4637,4644 ----
  	  HOST_WIDE_INT startb, endb;
  #endif
! 	  rtx bitlength_rtx, startbit_rtx, endbit_rtx, targetx;
  
  	  bitlength_rtx = expand_expr (bitlength,
! 				       NULL_RTX, MEM, EXPAND_CONST_ADDRESS);
  
  	  /* handle non-range tuple element like [ expr ]  */
*************** store_constructor (exp, target, align, c
*** 4671,4674 ****
--- 4648,4652 ----
  	      endbit = startbit;
  	    }
+ 
  	  startbit = convert (sizetype, startbit);
  	  endbit = convert (sizetype, endbit);
*************** store_constructor (exp, target, align, c
*** 4690,4693 ****
--- 4668,4672 ----
  	      emit_move_insn (targetx, target);
  	    }
+ 
  	  else if (GET_CODE (target) == MEM)
  	    targetx = target;
*************** store_constructor (exp, target, align, c
*** 4715,4725 ****
  	  else
  #endif
! 	    {
! 	      emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__setbits"),
! 				 0, VOIDmode, 4, XEXP (targetx, 0), Pmode,
! 				 bitlength_rtx, TYPE_MODE (sizetype),
! 				 startbit_rtx, TYPE_MODE (sizetype),
! 				 endbit_rtx, TYPE_MODE (sizetype));
! 	    }
  	  if (REG_P (target))
  	    emit_move_insn (target, targetx);
--- 4694,4703 ----
  	  else
  #endif
! 	    emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__setbits"),
! 			       0, VOIDmode, 4, XEXP (targetx, 0), Pmode,
! 			       bitlength_rtx, TYPE_MODE (sizetype),
! 			       startbit_rtx, TYPE_MODE (sizetype),
! 			       endbit_rtx, TYPE_MODE (sizetype));
! 
  	  if (REG_P (target))
  	    emit_move_insn (target, targetx);
*************** store_constructor (exp, target, align, c
*** 4743,4747 ****
     In this case, UNSIGNEDP must be nonzero if the value is an unsigned type.
  
!    ALIGN is the alignment that TARGET is known to have, measured in bytes.
     TOTAL_SIZE is the size in bytes of the structure, or -1 if varying.  
  
--- 4721,4725 ----
     In this case, UNSIGNEDP must be nonzero if the value is an unsigned type.
  
!    ALIGN is the alignment that TARGET is known to have.
     TOTAL_SIZE is the size in bytes of the structure, or -1 if varying.  
  
*************** store_field (target, bitsize, bitpos, mo
*** 4829,4836 ****
  	 store it as a bit field.  */
        || (mode != BLKmode && SLOW_UNALIGNED_ACCESS (mode, align)
! 	  && (align * BITS_PER_UNIT < GET_MODE_ALIGNMENT (mode)
  	      || bitpos % GET_MODE_ALIGNMENT (mode)))
        || (mode == BLKmode && SLOW_UNALIGNED_ACCESS (mode, align)
! 	  && (TYPE_ALIGN (TREE_TYPE (exp)) > align * BITS_PER_UNIT
  	      || bitpos % TYPE_ALIGN (TREE_TYPE (exp)) != 0))
        /* If the RHS and field are a constant size and the size of the
--- 4807,4814 ----
  	 store it as a bit field.  */
        || (mode != BLKmode && SLOW_UNALIGNED_ACCESS (mode, align)
! 	  && (align < GET_MODE_ALIGNMENT (mode)
  	      || bitpos % GET_MODE_ALIGNMENT (mode)))
        || (mode == BLKmode && SLOW_UNALIGNED_ACCESS (mode, align)
! 	  && (TYPE_ALIGN (TREE_TYPE (exp)) > align
  	      || bitpos % TYPE_ALIGN (TREE_TYPE (exp)) != 0))
        /* If the RHS and field are a constant size and the size of the
*************** store_field (target, bitsize, bitpos, mo
*** 4866,4870 ****
        if (GET_MODE (target) == BLKmode && GET_MODE (temp) == BLKmode)
  	{
! 	  unsigned int exp_align = expr_align (exp) / BITS_PER_UNIT;
  
  	  if (GET_CODE (target) != MEM || GET_CODE (temp) != MEM
--- 4844,4848 ----
        if (GET_MODE (target) == BLKmode && GET_MODE (temp) == BLKmode)
  	{
! 	  unsigned int exp_align = expr_align (exp);
  
  	  if (GET_CODE (target) != MEM || GET_CODE (temp) != MEM
*************** store_field (target, bitsize, bitpos, mo
*** 4880,4884 ****
  
  	  /* Find an alignment that is consistent with the bit position.  */
! 	  while ((bitpos % (align * BITS_PER_UNIT)) != 0)
  	    align >>= 1;
  
--- 4858,4862 ----
  
  	  /* Find an alignment that is consistent with the bit position.  */
! 	  while ((bitpos % align) != 0)
  	    align >>= 1;
  
*************** store_field (target, bitsize, bitpos, mo
*** 4958,4962 ****
     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 in bytes 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.
--- 4936,4940 ----
     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.
*************** get_inner_reference (exp, pbitsize, pbit
*** 5112,5116 ****
  
    *pmode = mode;
!   *palignment = alignment / BITS_PER_UNIT;
    return exp;
  }
--- 5090,5094 ----
  
    *pmode = mode;
!   *palignment = alignment;
    return exp;
  }
*************** expand_expr (exp, target, tmode, modifie
*** 6349,6361 ****
  		     && ! (target != 0 && safe_from_p (target, exp, 1)))
  		    || TREE_ADDRESSABLE (exp)
! 		    || (TREE_CODE (TYPE_SIZE_UNIT (type)) == INTEGER_CST
! 			&& TREE_INT_CST_HIGH (TYPE_SIZE_UNIT (type)) == 0
  			&& (! MOVE_BY_PIECES_P 
! 			    (TREE_INT_CST_LOW (TYPE_SIZE_UNIT (type)),
! 			     TYPE_ALIGN (type) / BITS_PER_UNIT))
  			&& ! mostly_zeros_p (exp))))
  	       || (modifier == EXPAND_INITIALIZER && TREE_CONSTANT (exp)))
  	{
  	  rtx constructor = output_constant_def (exp);
  	  if (modifier != EXPAND_CONST_ADDRESS
  	      && modifier != EXPAND_INITIALIZER
--- 6327,6339 ----
  		     && ! (target != 0 && safe_from_p (target, exp, 1)))
  		    || TREE_ADDRESSABLE (exp)
! 		    || (host_integerp (TYPE_SIZE_UNIT (type), 1)
  			&& (! MOVE_BY_PIECES_P 
! 			    (tree_low_cst (TYPE_SIZE_UNIT (type), 1),
! 			     TYPE_ALIGN (type)))
  			&& ! mostly_zeros_p (exp))))
  	       || (modifier == EXPAND_INITIALIZER && TREE_CONSTANT (exp)))
  	{
  	  rtx constructor = output_constant_def (exp);
+ 
  	  if (modifier != EXPAND_CONST_ADDRESS
  	      && modifier != EXPAND_INITIALIZER
*************** expand_expr (exp, target, tmode, modifie
*** 6699,6703 ****
  		&& (bitpos % bitsize) == 0 
  		&& (bitsize % GET_MODE_ALIGNMENT (mode1)) == 0
! 		&& (alignment * BITS_PER_UNIT) == GET_MODE_ALIGNMENT (mode1))
  	      {
  		rtx temp = change_address (op0, mode1,
--- 6677,6681 ----
  		&& (bitpos % bitsize) == 0 
  		&& (bitsize % GET_MODE_ALIGNMENT (mode1)) == 0
! 		&& alignment == GET_MODE_ALIGNMENT (mode1))
  	      {
  		rtx temp = change_address (op0, mode1,
*************** expand_expr (exp, target, tmode, modifie
*** 6773,6777 ****
  			&& SLOW_UNALIGNED_ACCESS (mode1, alignment)
  			&& ((TYPE_ALIGN (TREE_TYPE (tem))
! 			     < (unsigned int) GET_MODE_ALIGNMENT (mode))
  			    || (bitpos % GET_MODE_ALIGNMENT (mode) != 0)))
  		    /* If the type and the field are a constant size and the
--- 6751,6755 ----
  			&& SLOW_UNALIGNED_ACCESS (mode1, alignment)
  			&& ((TYPE_ALIGN (TREE_TYPE (tem))
! 			     < GET_MODE_ALIGNMENT (mode))
  			    || (bitpos % GET_MODE_ALIGNMENT (mode) != 0)))
  		    /* If the type and the field are a constant size and the
*************** expand_expr (exp, target, tmode, modifie
*** 6787,6791 ****
  		&& mode == BLKmode
  		&& SLOW_UNALIGNED_ACCESS (mode, alignment)
! 		&& (TYPE_ALIGN (type) > alignment * BITS_PER_UNIT
  		    || bitpos % TYPE_ALIGN (type) != 0)))
  	  {
--- 6765,6769 ----
  		&& mode == BLKmode
  		&& SLOW_UNALIGNED_ACCESS (mode, alignment)
! 		&& (TYPE_ALIGN (type) > alignment
  		    || bitpos % TYPE_ALIGN (type) != 0)))
  	  {
*************** expand_expr (exp, target, tmode, modifie
*** 6816,6820 ****
  				 GEN_INT ((bitsize + BITS_PER_UNIT - 1)
  					  / BITS_PER_UNIT),
! 				 1);
  		
  		return target;
--- 6794,6798 ----
  				 GEN_INT ((bitsize + BITS_PER_UNIT - 1)
  					  / BITS_PER_UNIT),
! 				 BITS_PER_UNIT);
  		
  		return target;
*************** expand_expr (exp, target, tmode, modifie
*** 6824,6828 ****
  
  	    if (GET_CODE (op0) == MEM && GET_CODE (XEXP (op0, 0)) == REG)
! 	      mark_reg_pointer (XEXP (op0, 0), alignment);
  
  	    op0 = extract_bit_field (op0, bitsize, bitpos,
--- 6802,6806 ----
  
  	    if (GET_CODE (op0) == MEM && GET_CODE (XEXP (op0, 0)) == REG)
! 	      mark_reg_pointer (XEXP (op0, 0), alignment / BITS_PER_UNIT);
  
  	    op0 = extract_bit_field (op0, bitsize, bitpos,
*************** expand_expr (exp, target, tmode, modifie
*** 6875,6879 ****
   
  	if (GET_CODE (XEXP (op0, 0)) == REG)
! 	  mark_reg_pointer (XEXP (op0, 0), alignment);
  
  	MEM_SET_IN_STRUCT_P (op0, 1);
--- 6853,6857 ----
   
  	if (GET_CODE (XEXP (op0, 0)) == REG)
! 	  mark_reg_pointer (XEXP (op0, 0), alignment / BITS_PER_UNIT);
  
  	MEM_SET_IN_STRUCT_P (op0, 1);
*************** expand_expr_unaligned (exp, palign)
*** 8723,8727 ****
  	    || GET_CODE (op0) == REG || GET_CODE (op0) == SUBREG
  	    || (SLOW_UNALIGNED_ACCESS (mode1, alignment)
! 		&& (TYPE_ALIGN (type) > alignment * BITS_PER_UNIT
  		    || bitpos % TYPE_ALIGN (type) != 0)))
  	  {
--- 8701,8705 ----
  	    || GET_CODE (op0) == REG || GET_CODE (op0) == SUBREG
  	    || (SLOW_UNALIGNED_ACCESS (mode1, alignment)
! 		&& (TYPE_ALIGN (type) > alignment
  		    || bitpos % TYPE_ALIGN (type) != 0)))
  	  {
*************** expand_expr_unaligned (exp, palign)
*** 8781,8785 ****
  
  	if (GET_CODE (XEXP (op0, 0)) == REG)
! 	  mark_reg_pointer (XEXP (op0, 0), alignment);
  
  	MEM_IN_STRUCT_P (op0) = 1;
--- 8759,8763 ----
  
  	if (GET_CODE (XEXP (op0, 0)) == REG)
! 	  mark_reg_pointer (XEXP (op0, 0), alignment / BITS_PER_UNIT);
  
  	MEM_IN_STRUCT_P (op0) = 1;
*************** do_jump (exp, if_false_label, if_true_la
*** 9364,9370 ****
  	/* 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);
  
  	type = type_for_size (bitsize, unsignedp);
--- 9342,9347 ----
  	/* 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);
  
  	type = type_for_size (bitsize, unsignedp);
*************** do_compare_and_jump (exp, signed_code, u
*** 10051,10055 ****
  			   ((mode == BLKmode)
  			    ? expr_size (TREE_OPERAND (exp, 0)) : NULL_RTX),
! 			   MIN (align0, align1) / BITS_PER_UNIT,
  			   if_false_label, if_true_label);
  }
--- 10028,10032 ----
  			   ((mode == BLKmode)
  			    ? expr_size (TREE_OPERAND (exp, 0)) : NULL_RTX),
! 			   MIN (align0, align1),
  			   if_false_label, if_true_label);
  }
*** expr.h	2000/03/25 18:34:01	1.60
--- expr.h	2000/03/30 11:20:06
*************** extern void emit_0_to_1_insn PARAMS ((rt
*** 794,803 ****
  /* 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, int));
  
  /* 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, int, rtx));
  
  /* The various uses that a comparison can have; used by can_compare_p:
--- 794,804 ----
  /* 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));
  
  /* 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));
  
  /* The various uses that a comparison can have; used by can_compare_p:
*** function.c	2000/03/29 13:10:41	1.184
--- function.c	2000/03/30 11:20:21
*************** purge_addressof_1 (loc, insn, force, sto
*** 3028,3032 ****
  		  store_bit_field (sub, size_x, 0, GET_MODE (x),
  				   val, GET_MODE_SIZE (GET_MODE (sub)),
! 				   GET_MODE_SIZE (GET_MODE (sub)));
  
  		  /* Make sure to unshare any shared rtl that store_bit_field
--- 3028,3032 ----
  		  store_bit_field (sub, size_x, 0, GET_MODE (x),
  				   val, GET_MODE_SIZE (GET_MODE (sub)),
! 				   GET_MODE_ALIGNMENT (GET_MODE (sub)));
  
  		  /* Make sure to unshare any shared rtl that store_bit_field
*************** assign_parms (fndecl)
*** 4340,4345 ****
  		emit_group_store (validize_mem (stack_parm), entry_parm,
  				  int_size_in_bytes (TREE_TYPE (parm)),
! 				  (TYPE_ALIGN (TREE_TYPE (parm))
! 				   / BITS_PER_UNIT));
  	      else
  		move_block_from_reg (REGNO (entry_parm),
--- 4340,4345 ----
  		emit_group_store (validize_mem (stack_parm), entry_parm,
  				  int_size_in_bytes (TREE_TYPE (parm)),
! 				  TYPE_ALIGN (TREE_TYPE (parm)));
! 				  
  	      else
  		move_block_from_reg (REGNO (entry_parm),
*************** assign_parms (fndecl)
*** 4499,4504 ****
  		emit_group_store (validize_mem (stack_parm), entry_parm,
  				  int_size_in_bytes (TREE_TYPE (parm)),
! 				  (TYPE_ALIGN (TREE_TYPE (parm))
! 				   / BITS_PER_UNIT));
  	      else
  		move_block_from_reg (REGNO (entry_parm),
--- 4499,4503 ----
  		emit_group_store (validize_mem (stack_parm), entry_parm,
  				  int_size_in_bytes (TREE_TYPE (parm)),
! 				  TYPE_ALIGN (TREE_TYPE (parm)));
  	      else
  		move_block_from_reg (REGNO (entry_parm),
*** optabs.c	2000/03/25 18:34:03	1.65
--- optabs.c	2000/03/30 11:20:34
*************** prepare_cmp_insn (px, py, pcomparison, s
*** 2917,2920 ****
--- 2917,2921 ----
    int unsignedp = *punsignedp;
    enum mode_class class;
+   rtx opalign ATTRIBUTE_UNUSED = GEN_INT (align / BITS_PER_UNIT);;
  
    class = GET_MODE_CLASS (mode);
*************** prepare_cmp_insn (px, py, pcomparison, s
*** 2933,2940 ****
    /* If we are inside an appropriately-short loop and one operand is an
       expensive constant, force it into a register.  */
!   if (CONSTANT_P (x) && preserve_subexpressions_p () && rtx_cost (x, COMPARE) > 2)
      x = force_reg (mode, x);
  
!   if (CONSTANT_P (y) && preserve_subexpressions_p () && rtx_cost (y, COMPARE) > 2)
      y = force_reg (mode, y);
  
--- 2934,2943 ----
    /* If we are inside an appropriately-short loop and one operand is an
       expensive constant, force it into a register.  */
!   if (CONSTANT_P (x) && preserve_subexpressions_p ()
!       && rtx_cost (x, COMPARE) > 2)
      x = force_reg (mode, x);
  
!   if (CONSTANT_P (y) && preserve_subexpressions_p ()
!       && rtx_cost (y, COMPARE) > 2)
      y = force_reg (mode, y);
  
*************** prepare_cmp_insn (px, py, pcomparison, s
*** 2971,2975 ****
  	  result_mode = insn_data[(int) CODE_FOR_cmpstrqi].operand[0].mode;
  	  result = gen_reg_rtx (result_mode);
! 	  emit_insn (gen_cmpstrqi (result, x, y, size, GEN_INT (align)));
  	}
        else
--- 2974,2978 ----
  	  result_mode = insn_data[(int) CODE_FOR_cmpstrqi].operand[0].mode;
  	  result = gen_reg_rtx (result_mode);
! 	  emit_insn (gen_cmpstrqi (result, x, y, size, opalign));
  	}
        else
*************** prepare_cmp_insn (px, py, pcomparison, s
*** 2982,2986 ****
  	  result_mode = insn_data[(int) CODE_FOR_cmpstrhi].operand[0].mode;
  	  result = gen_reg_rtx (result_mode);
! 	  emit_insn (gen_cmpstrhi (result, x, y, size, GEN_INT (align)));
  	}
        else
--- 2985,2989 ----
  	  result_mode = insn_data[(int) CODE_FOR_cmpstrhi].operand[0].mode;
  	  result = gen_reg_rtx (result_mode);
! 	  emit_insn (gen_cmpstrhi (result, x, y, size, opalign));
  	}
        else
*************** prepare_cmp_insn (px, py, pcomparison, s
*** 2994,2998 ****
  	  emit_insn (gen_cmpstrsi (result, x, y,
  				   convert_to_mode (SImode, size, 1),
! 				   GEN_INT (align)));
  	}
        else
--- 2997,3001 ----
  	  emit_insn (gen_cmpstrsi (result, x, y,
  				   convert_to_mode (SImode, size, 1),
! 				   opalign));
  	}
        else
*************** emit_cmp_and_jump_insns (x, y, compariso
*** 3191,3195 ****
       enum machine_mode mode;
       int unsignedp;
!      int align;
       rtx label;
  {
--- 3194,3198 ----
       enum machine_mode mode;
       int unsignedp;
!      unsigned int align;
       rtx label;
  {
*************** emit_cmp_and_jump_insns (x, y, compariso
*** 3228,3231 ****
--- 3231,3235 ----
  
  /* 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, m
*** 3235,3239 ****
       enum machine_mode mode;
       int unsignedp;
!      int align;
  {
    emit_cmp_and_jump_insns (x, y, comparison, size, mode, unsignedp, align, 0);
--- 3239,3243 ----
       enum machine_mode mode;
       int unsignedp;
!      unsigned int align;
  {
    emit_cmp_and_jump_insns (x, y, comparison, size, mode, unsignedp, align, 0);
*** stmt.c	2000/03/29 22:48:25	1.137
--- stmt.c	2000/03/30 11:20:43
*************** expand_value_return (val)
*** 2726,2730 ****
        if (GET_CODE (return_reg) == PARALLEL)
  	emit_group_load (return_reg, val, int_size_in_bytes (type),
! 			 TYPE_ALIGN (type) / BITS_PER_UNIT);
        else
  	emit_move_insn (return_reg, val);
--- 2726,2730 ----
        if (GET_CODE (return_reg) == PARALLEL)
  	emit_group_load (return_reg, val, int_size_in_bytes (type),
! 			 TYPE_ALIGN (type));
        else
  	emit_move_insn (return_reg, val);
*************** expand_return (retval)
*** 3015,3023 ****
  			   extract_bit_field (src, bitsize,
  					      bitpos % BITS_PER_WORD, 1,
! 					      NULL_RTX, word_mode,
! 					      word_mode,
! 					      bitsize / BITS_PER_UNIT,
! 					      BITS_PER_WORD),
! 			   bitsize / BITS_PER_UNIT, BITS_PER_WORD);
  	}
  
--- 3015,3021 ----
  			   extract_bit_field (src, bitsize,
  					      bitpos % BITS_PER_WORD, 1,
! 					      NULL_RTX, word_mode, word_mode,
! 					      bitsize, BITS_PER_WORD),
! 			   bitsize, BITS_PER_WORD);
  	}
  
*** stor-layout.c	2000/03/29 20:34:34	1.63
--- stor-layout.c	2000/03/30 11:20:46
*************** get_mode_alignment (mode)
*** 1768,1777 ****
       enum machine_mode mode;
  {
!   unsigned alignment = GET_MODE_UNIT_SIZE (mode);
    
    /* Extract the LSB of the size.  */
    alignment = alignment & -alignment;
-   
-   alignment *= BITS_PER_UNIT;
  
    alignment = MIN (BIGGEST_ALIGNMENT, MAX (1, alignment));
--- 1768,1775 ----
       enum machine_mode mode;
  {
!   unsigned int alignment = GET_MODE_UNIT_SIZE (mode) * BITS_PER_UNIT;
    
    /* Extract the LSB of the size.  */
    alignment = alignment & -alignment;
  
    alignment = MIN (BIGGEST_ALIGNMENT, MAX (1, alignment));
*** ch/expr.c	2000/02/27 21:39:36	1.17
--- ch/expr.c	2000/03/30 11:20:55
*************** chill_expand_expr (exp, target, tmode, m
*** 363,367 ****
  		  return temp;
  		emit_block_move (target, temp, expr_size (exp0),
! 				 TYPE_ALIGN (TREE_TYPE(exp0)) / BITS_PER_UNIT);
  		return target;
  	      }
--- 363,367 ----
  		  return temp;
  		emit_block_move (target, temp, expr_size (exp0),
! 				 TYPE_ALIGN (TREE_TYPE(exp0)));
  		return target;
  	      }
*** config/rs6000/rs6000.h	2000/03/29 13:10:44	1.74
--- config/rs6000/rs6000.h	2000/03/30 11:21:09
*************** extern int rs6000_debug_arg;		/* debug a
*** 619,623 ****
     ((STRICT_ALIGNMENT						\
       || (((MODE) == SFmode || (MODE) == DFmode || (MODE) == DImode) \
!          && (ALIGN) < 4)) ? 1 : 0)
  
  /* Standard register usage.  */
--- 619,623 ----
     ((STRICT_ALIGNMENT						\
       || (((MODE) == SFmode || (MODE) == DFmode || (MODE) == DImode) \
!          && (ALIGN) < 32)) ? 1 : 0)
  
  /* Standard register usage.  */
*** config/sh/sh.h	2000/02/28 22:15:23	1.55
--- config/sh/sh.h	2000/03/30 11:21:16
*************** extern int current_function_anonymous_ar
*** 1184,1188 ****
  #define MOVE_BY_PIECES_P(SIZE, ALIGN)  (move_by_pieces_ninsns (SIZE, ALIGN) \
                                          < (TARGET_SMALLCODE ? 2 :           \
!                                            ((ALIGN >= 4) ? 16 : 2)))
  
  /* Macros to check register numbers against specific register classes.  */
--- 1184,1188 ----
  #define MOVE_BY_PIECES_P(SIZE, ALIGN)  (move_by_pieces_ninsns (SIZE, ALIGN) \
                                          < (TARGET_SMALLCODE ? 2 :           \
!                                            ((ALIGN >= 32) ? 16 : 2)))
  
  /* Macros to check register numbers against specific register classes.  */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]