lkml.org 
[lkml]   [2000]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Recent change in tcp_output.c is surely wrong
    On Tue, 18 Jan 2000, Jamie Lokier wrote:

    > Richard B. Johnson wrote:
    > > > Leave that to the gcc. If it is faster to clear high bit with two
    > > > shifts, _gcc_ is the one to decide that. And yes gcc is clever enough
    > > > to se things like that. [replacing and 0x7fffffff with shl 1 shr 1
    > > > is really no problem].
    > >
    > > Well it's a problem if it doesn't work.
    >
    > > int main()
    > > {
    > > int xxx = 0xffffffff;
    > > printf("%d\n", foo0(xxx));
    > > printf("%d\n", foo1(xxx));
    > > return 0;
    > > }
    >
    > You forgot to use `unsigned int' :-)

    Well if it is unsigned (I only have up to version 2.3.39) and
    looking through this code doesn't show the construct demonstrated;
    I'm sorry for the poor demo. If it is unsigned, why would anyone
    try to out-code a AND?

    Cheers,
    Dick Johnson

    Penguin : Linux version 2.3.39 on an i686 machine (800.63 BogoMips).


    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:56    [W:0.022 / U:0.040 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site