OSDN Git Service

2012-06-04 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / lto-section-in.c
index 0c2c4c0..fb0c70d 100644 (file)
@@ -53,6 +53,7 @@ const char *lto_section_name[LTO_N_SECTION_TYPES] =
   "cgraph",
   "vars",
   "refs",
+  "asm",
   "jmpfuncs",
   "pureconst",
   "reference",
@@ -63,115 +64,6 @@ const char *lto_section_name[LTO_N_SECTION_TYPES] =
 };
 
 
-/* Read an ULEB128 Number of IB.  */
-
-unsigned HOST_WIDE_INT
-lto_input_uleb128 (struct lto_input_block *ib)
-{
-  unsigned HOST_WIDE_INT result = 0;
-  int shift = 0;
-  unsigned HOST_WIDE_INT byte;
-
-  while (true)
-    {
-      byte = lto_input_1_unsigned (ib);
-      result |= (byte & 0x7f) << shift;
-      shift += 7;
-      if ((byte & 0x80) == 0)
-       return result;
-    }
-}
-
-/* HOST_WIDEST_INT version of lto_input_uleb128.  IB is as in
-   lto_input_uleb128.  */
-
-unsigned HOST_WIDEST_INT
-lto_input_widest_uint_uleb128 (struct lto_input_block *ib)
-{
-  unsigned HOST_WIDEST_INT result = 0;
-  int shift = 0;
-  unsigned HOST_WIDEST_INT byte;
-
-  while (true)
-    {
-      byte = lto_input_1_unsigned (ib);
-      result |= (byte & 0x7f) << shift;
-      shift += 7;
-      if ((byte & 0x80) == 0)
-       return result;
-    }
-}
-
-/* Read an SLEB128 Number of IB.  */
-
-HOST_WIDE_INT
-lto_input_sleb128 (struct lto_input_block *ib)
-{
-  HOST_WIDE_INT result = 0;
-  int shift = 0;
-  unsigned HOST_WIDE_INT byte;
-
-  while (true)
-    {
-      byte = lto_input_1_unsigned (ib);
-      result |= (byte & 0x7f) << shift;
-      shift += 7;
-      if ((byte & 0x80) == 0)
-       {
-         if ((shift < HOST_BITS_PER_WIDE_INT) && (byte & 0x40))
-           result |= - ((HOST_WIDE_INT)1 << shift);
-
-         return result;
-       }
-    }
-}
-
-
-/* Unpack VAL from BP in a variant of uleb format.  */
-
-unsigned HOST_WIDE_INT
-bp_unpack_var_len_unsigned (struct bitpack_d *bp)
-{
-  unsigned HOST_WIDE_INT result = 0;
-  int shift = 0;
-  unsigned HOST_WIDE_INT half_byte;
-
-  while (true)
-    {
-      half_byte = bp_unpack_value (bp, 4);
-      result |= (half_byte & 0x7) << shift;
-      shift += 3;
-      if ((half_byte & 0x8) == 0)
-       return result;
-    }
-}
-
-
-/* Unpack VAL from BP in a variant of sleb format.  */
-
-HOST_WIDE_INT
-bp_unpack_var_len_int (struct bitpack_d *bp)
-{
-  HOST_WIDE_INT result = 0;
-  int shift = 0;
-  unsigned HOST_WIDE_INT half_byte;
-
-  while (true)
-    {
-      half_byte = bp_unpack_value (bp, 4);
-      result |= (half_byte & 0x7) << shift;
-      shift += 3;
-      if ((half_byte & 0x8) == 0)
-       {
-         if ((shift < HOST_BITS_PER_WIDE_INT) && (half_byte & 0x4))
-           result |= - ((HOST_WIDE_INT)1 << shift);
-
-         return result;
-       }
-    }
-}
-
-
 /* Hooks so that the ipa passes can call into the lto front end to get
    sections.  */
 
@@ -332,7 +224,7 @@ lto_create_simple_input_block (struct lto_file_decl_data *file_data,
     = (const struct lto_simple_header *) data;
 
   struct lto_input_block* ib_main;
-  int32_t main_offset = sizeof (struct lto_simple_header);
+  int main_offset = sizeof (struct lto_simple_header);
 
   if (!data)
     return NULL;