Re: Recent change in tcp_output.c is surely wrong

From: Rogier Wolff (R.E.Wolff@BitWizard.nl)
Date: Tue Jan 18 2000 - 06:21:37 EST


Jamie Lokier wrote:
> For a signed int, that optimisation would be valid on an Alpha. Even in
> GCC's model. Think about what signed right shifts do. But for an
> unsigned int, it would be equivalent to `a & 0x0fffffff'.

And I'm saying that this requirement from the standard means that an
extra instruction needs to be inserted to do the & 0xffffffff on the
intermediate on Alpha.

This is a performance impact, which the ansi guys tried to prevent in
most cases. They carefully wrote "undefined" in all cases where
implementation details would change the results, trying to allow
compiler writers to optimze for the common case.

                                        Roger.

-- 
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
 "I didn't say it was your fault. I said I was going to blame it on you."

- 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