Re: Recent change in tcp_output.c is surely wrong

From: Matthew Wilcox (willy@thepuffingroup.com)
Date: Mon Jan 17 2000 - 16:34:54 EST


On Mon, Jan 17, 2000 at 01:18:45PM -0800, David S. Miller wrote:
> > 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.

Really? On ARM and PA-RISC, it's 1 instruction (BIC and DEPI,
respectively). Do SPARC, MIPS and Alpha really not have a `clear bit'
instruction?

> and `&= (1U<<31)' is more obvious. Using a symbolic constant would be even
> better.
>
> You mean '&= ~(1UL<<31)'

Yes, I do.

-
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:16 EST