"cgraph",
"vars",
"refs",
+ "asm",
"jmpfuncs",
"pureconst",
"reference",
};
-/* 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;
- }
- }
-}
-
-
/* Hooks so that the ipa passes can call into the lto front end to get
sections. */
void
lto_section_overrun (struct lto_input_block *ib)
{
- internal_error ("bytecode stream: trying to read %d bytes "
- "after the end of the input buffer", ib->p - ib->len);
+ fatal_error ("bytecode stream: trying to read %d bytes "
+ "after the end of the input buffer", ib->p - ib->len);
+}
+
+/* Report out of range value. */
+
+void
+lto_value_range_error (const char *purpose, HOST_WIDE_INT val,
+ HOST_WIDE_INT min, HOST_WIDE_INT max)
+{
+ fatal_error ("%s out of range: Range is %i to %i, value is %i",
+ purpose, (int)min, (int)max, (int)val);
}