[lkml]   [1996]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectstring-486.h - why not used?


Yesterday, I noticed the header file "string-486.h" isn't used - not
included from include/asm-i386/string.h. (Note: *-486.h is suppose to
contain optimised string/memory funcs for 486s and Pentiums).
Why is the header not used? Are the 486 optimised string functions
broken, or are they no more optimal than using the 'rep*'/string

For the str*() funcs, it's probably not worthwhile trying to avoid the
string ops. I'm guessing most kernel strings are reasonably short-ish, so
any cycles saved are not significant.
But, wouldn't avoiding Intel's string ops give a better chance of
register allocation? (not forced to use ecx/eax/edi).

For the mem*() funcs, isn't it worthwhile to avoid the 'sto*'s?
A quick look in string-486.h shows that the mem*() funcs haven't been
agressively optimised - no loop unrolling, or src/dest alignments to
dword boundaries before entering a loop.
OK, there is the Pentium FPU-memcopy() patch, which works for most users.
But that doesn't help the i486.

Also, most loops are not aligned on a 16byte boundary, which helps the
i486 (or is something going on which I'm missing...).

Could someone with more knowledge comment?


Mark Hemment, Unix/C Software Engineer (Contractor)

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