[lkml]   [2001]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: * 4 converted to << 2 for networking code
Mike Harrold wrote:
> Be careful. *4 is not a simple <<2 substitution (by the compiler) if
> the variable is signed. *4 translates to 3 instructions (on x86) if
> it's an int.

I think you mean /4 is not the same as >>2 if the variable is signed.

In general, non-widening multiplies give the same result for signed and
unsigned variables.

-- Jamie
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:28    [W:0.072 / U:12.776 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site