lkml.org 
[lkml]   [1999]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Kernel checksum routime (>=5)x86 optimization
Kurt Garloff wrote:
>
> By the way: Is it correct to use adcl in this piece of code???

yes

> Why do we want to add 1 instead of 1<<32 in case of overflow???

one's complement arithmetic (see rfc1071 for details on the checksum)


> > For instructions this simple the integer units are probably faster than
> > the instruction decoder anyway.
>
> That might be the reason, yes.
> it might also be that only one load can be executed per cycle.

ppro+ breaks up instructions into something intel calls 'microops'.
There are three decoders, the first can do four microops per cycle,
the other two only one/cycle. so you can have up to three instructions
per cycle, but only one can be complex and the others must be simple.
For example that routine with "%adcl XX(%esi), %eax" replaced with
"addl XX(%esi), %eax ; setc %ch; addb %ch, %bl" only does two
percent worse. With "addl XX(%esi), %eax ; adcl $0, %ebx" it does
10% worse.

artur


-
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:51    [W:0.064 / U:1.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site