Re: Recent change in tcp_output.c is surely wrong

From: Pavel Machek (pavel@suse.cz)
Date: Tue Jan 18 2000 - 09:27:25 EST


Hi!

> > If the intention is to clear bit 31, `&= 0x7fffffff' is the thing which
> > works and is probably more efficient.
>
> Not true on all RISC machines I am familiar with. It's 2 instructions
> either way. On x86 you'll end up using a larger opcode and one of
> x86's most notable performance advantages is it's code density.

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].

                                                                Pavel

-- 
The best software in life is free (not shareware)!		Pavel
GCM d? s-: !g p?:+ au- a--@ w+ v- C++@ UL+++ L++ N++ E++ W--- M- Y- R+

- 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/



This archive was generated by hypermail 2b29 : Sun Jan 23 2000 - 21:00:17 EST