On Mon, 30 May 2011 15:16:16 -0400
Diego Novillo <dnovi...@google.com> wrote:
[...]
> 
> 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?
> 

I am not familiar with that code in gcc/lto-streamer.h, but I just
glanced at it and I also believe these should be right shifts.

And indeed, the symmetrical function lto_input_int_in_range has rightly
left shifts.

Cheers.


-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mine, sont seulement les miennes} ***

Reply via email to