OSDN Git Service

Oops - forgot to include ChangeLog entry for m32r patch
[pf3gnuchains/gcc-fork.git] / gcc / stor-layout.c
index 10496b8..2814622 100644 (file)
@@ -1,6 +1,6 @@
 /* C-compiler utilities for types and variables storage layout
    Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1996, 1998,
-   1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+   1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -47,10 +47,6 @@ unsigned int maximum_field_alignment = TARGET_DEFAULT_PACK_STRUCT * BITS_PER_UNI
 /* ... and its original value in bytes, specified via -fpack-struct=<value>.  */
 unsigned int initial_max_fld_align = TARGET_DEFAULT_PACK_STRUCT;
 
-/* If nonzero, the alignment of a bitstring or (power-)set value, in bits.
-   May be overridden by front-ends.  */
-unsigned int set_alignment = 0;
-
 /* Nonzero if all REFERENCE_TYPEs are internal and hence should be
    allocated in Pmode, not ptr_mode.   Set only by internal_reference_types
    called only by a front end.  */
@@ -489,7 +485,7 @@ relayout_decl (tree decl)
 /* Hook for a front-end function that can modify the record layout as needed
    immediately before it is finalized.  */
 
-void (*lang_adjust_rli) (record_layout_info) = 0;
+static void (*lang_adjust_rli) (record_layout_info) = 0;
 
 void
 set_lang_adjust_rli (void (*f) (record_layout_info))
@@ -1577,7 +1573,7 @@ layout_type (tree type)
        TYPE_SIZE (type) = int_const_binop (MULT_EXPR, TYPE_SIZE (innertype),
                                            nunits_tree, 0);
 
-       /* Always natually align vectors.  This prevents ABI changes
+       /* Always naturally align vectors.  This prevents ABI changes
           depending on whether or not native vector modes are supported.  */
        TYPE_ALIGN (type) = tree_low_cst (TYPE_SIZE (type), 0);
         break;
@@ -1763,40 +1759,6 @@ layout_type (tree type)
       }
       break;
 
-    case SET_TYPE:  /* Used by Chill and Pascal.  */
-      {
-       unsigned int alignment;
-       HOST_WIDE_INT size_in_bits;
-       HOST_WIDE_INT rounded_size;
-
-       gcc_assert (TREE_CODE (TYPE_MAX_VALUE (TYPE_DOMAIN (type)))
-                   == INTEGER_CST);
-       gcc_assert (TREE_CODE (TYPE_MIN_VALUE (TYPE_DOMAIN (type)))
-                   == INTEGER_CST);
-
-#ifndef SET_WORD_SIZE
-#define SET_WORD_SIZE BITS_PER_WORD
-#endif
-       alignment = set_alignment ? set_alignment : SET_WORD_SIZE;
-       size_in_bits
-         = (tree_low_cst (TYPE_MAX_VALUE (TYPE_DOMAIN (type)), 0)
-            - tree_low_cst (TYPE_MIN_VALUE (TYPE_DOMAIN (type)), 0) + 1);
-       rounded_size
-         = ((size_in_bits + alignment - 1) / alignment) * alignment;
-
-       if (rounded_size > (int) alignment)
-         TYPE_MODE (type) = BLKmode;
-       else
-         TYPE_MODE (type) = mode_for_size (alignment, MODE_INT, 1);
-
-       TYPE_SIZE (type) = bitsize_int (rounded_size);
-       TYPE_SIZE_UNIT (type) = size_int (rounded_size / BITS_PER_UNIT);
-       TYPE_ALIGN (type) = alignment;
-       TYPE_USER_ALIGN (type) = 0;
-       TYPE_PRECISION (type) = size_in_bits;
-      }
-      break;
-
     case FILE_TYPE:
       /* The size may vary in different languages, so the language front end
         should fill in the size.  */
@@ -2131,8 +2093,8 @@ get_mode_bounds (enum machine_mode mode, int sign,
       max_val = ((unsigned HOST_WIDE_INT) 1 << (size - 1) << 1) - 1;
     }
 
-  *mmin = GEN_INT (trunc_int_for_mode (min_val, target_mode));
-  *mmax = GEN_INT (trunc_int_for_mode (max_val, target_mode));
+  *mmin = gen_int_mode (min_val, target_mode);
+  *mmax = gen_int_mode (max_val, target_mode);
 }
 
 #include "gt-stor-layout.h"