minix/lib/i386/string
2009-11-09 10:26:00 +00:00
..
_memmove.s Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
_strncat.s Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
_strncmp.s Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
_strncpy.s Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
_strnlen.s Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
bcmp.s Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
bcopy.s Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
bzero.s Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
index.s Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
Makefile.in Joren's new library make system (minus Makefiles) 2006-01-16 15:44:55 +00:00
memchr.s Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
memcmp.s Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
memcpy.s Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
memmove.s Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
memset.s Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
README Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
rindex.s Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
strcat.s Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
strchr.s Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
strcmp.s Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
strcpy.s Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
strlen.s Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
strncat.s Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
strncmp.s Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
strncpy.s Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
strnlen.s Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
strrchr.s Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00

Notes on i80386 string assembly routines.		Author: Kees J. Bot
								2 Jan 1994

Remarks.
    All routines set up proper stack frames, so that stack traces can be
    derived from core dumps.  String routines are often the ones that
    get the bad pointer.

    Flags are often not right in boundary cases (zero string length) on
    repeated string scanning or comparing instructions.  This has been
    handled in sometimes nonobvious ways.

    Only the eax, edx, and ecx registers are not preserved, all other
    registers are.  This is what GCC expects.  (ACK sees ebx as scratch
    too.)  The direction byte is assumed to be wrong, and left clear on
    exit.

Assumptions.
    The average string is short, so short strings should not suffer from
    smart tricks to copy, compare, or search large strings fast.  This
    means that the routines are fast on average, but not optimal for
    long strings.

    It doesn't pay to use word or longword operations on strings, the
    setup time hurts the average case.

    Memory blocks are probably large and on word or longword boundaries.

    No unaligned word moves are done.  Again the setup time may hurt the
    average case.  Furthermore, the author likes to enable the alignment
    check on a 486.

String routines.
    They have been implemented using byte string instructions.  The
    length of a string it usually determined first, followed by the
    actual operation.

Strcmp.
    This is the only string routine that uses a loop, and not
    instructions with a repeat prefix.  Problem is that we don't know
    how long the string is.  Scanning for the end costs if the strings
    are unequal in the first few bytes.

Strchr.
    The character we look for is often not there, or at some distance
    from the start.  The string is scanned twice, for the terminating
    zero and the character searched, in chunks of increasing length.

Memory routines.
    Memmove, memcpy, and memset use word or longword instructions if the
    address(es) are at word or longword boundaries.  No tricks to get
    alignment after doing a few bytes.  No unaligned operations.