LTO streaming problems when LTO_tags are > 255
Jan Hubicka
hubicka@ucw.cz
Tue May 31 08:16:00 GMT 2011
> On Mon, May 30, 2011 at 9:16 PM, Diego Novillo <dnovillo@google.com> wrote:
> > The new routines lto_output_int_in_range and lto_input_int_in_range do
> > not seem to be working right. Â In the pph branch, we have an LTO_tags
> > enum with a range [0 - 351]. Â This is causing two things:
> >
> > - The writer gets out of sync with the reader because, we emit
> > delimiters with output_zero. Â This writes only 1 byte, which then
> > confuses input_record_start, which expects to read two bytes.
> > - The code that deals with values outside the 0xff range is not
> > splitting up the word properly:
> >
> > lto_output_int_in_range(...)
> > [ ... ]
> > 1322 Â Â Â val -= min;
> > 1323 Â Â Â lto_output_1_stream (obs, val & 255);
> > 1324 Â Â Â if (range >= 0xff)
> > 1325 Â Â Â Â lto_output_1_stream (obs, (val << 8) & 255);
> > 1326 Â Â Â if (range >= 0xffff)
> > 1327 Â Â Â Â lto_output_1_stream (obs, (val << 16) & 255);
> > 1328 Â Â Â if (range >= 0xffffff)
> > 1329 Â Â Â Â lto_output_1_stream (obs, (val << 24) & 255);
> >
> > Those should be right shifts. Â Or am I misreading this code?
>
> Yes, I think they should be right-shifts.
Yeah, my mistake, sorry...
Honza
>
> Richard.
>
> >
> > Thanks. Â Diego.
> >
More information about the Gcc
mailing list